From f482f8f88a8dcb029d260424233781c89004648f Mon Sep 17 00:00:00 2001 From: maddalax Date: Sat, 21 Sep 2024 13:14:51 -0500 Subject: [PATCH] add curl --- cli/htmgo/tasks/css/css.go | 2 +- cli/htmgo/tasks/process/process.go | 6 ++++++ htmgo-site/Dockerfile | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cli/htmgo/tasks/css/css.go b/cli/htmgo/tasks/css/css.go index 96a4cea..d151fd4 100644 --- a/cli/htmgo/tasks/css/css.go +++ b/cli/htmgo/tasks/css/css.go @@ -41,5 +41,5 @@ func DownloadTailwindCli() error { fmt.Sprintf(`curl -LO %s`, url), fmt.Sprintf(`chmod +x %s`, fileName), fmt.Sprintf(`mv %s ./assets/css/tailwindcss`, fileName), - }) + }, process.ExitOnError) } diff --git a/cli/htmgo/tasks/process/process.go b/cli/htmgo/tasks/process/process.go index 0b33eaf..9191d65 100644 --- a/cli/htmgo/tasks/process/process.go +++ b/cli/htmgo/tasks/process/process.go @@ -196,6 +196,12 @@ func Run(command string, flags ...RunFlag) error { err := cmd.Run() + slog.Debug("command finished", + slog.String("command", command), + slog.String("dir", cmd.Dir), + slog.String("cwd", GetWorkingDir()), + slog.String("error", fmt.Sprintf("%v", err))) + if err == nil { return nil } diff --git a/htmgo-site/Dockerfile b/htmgo-site/Dockerfile index 06ab0cb..719e64f 100644 --- a/htmgo-site/Dockerfile +++ b/htmgo-site/Dockerfile @@ -1,7 +1,9 @@ # Stage 1: Build the Go binary FROM golang:1.23-alpine AS builder +RUN apk update RUN apk add git +RUN apk add curl # Set the working directory inside the container WORKDIR /app