Skip to content

Commit 9968d57

Browse files
committed
fix(container): put $(go env GOPATH)/bin on PATH for templ
Previous run failed with `bash: line 5: templ: command not found` (exit 127). `go install` drops into $(go env GOPATH)/bin and the bash shell that build-container.yml spawns for pre-build-command doesn't inherit that on PATH. Prepend it between install and invocation. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
1 parent 191475c commit 9968d57

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/container.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ jobs:
6161
6262
echo "::group::install templ + generate"
6363
go install github.com/a-h/templ/cmd/templ@latest
64+
# `go install` drops binaries into $(go env GOPATH)/bin, which is
65+
# not on PATH for the ad-hoc bash shell the reusable
66+
# build-container.yml spawns for pre-build-command. Add it.
67+
export PATH="$(go env GOPATH)/bin:${PATH}"
6468
templ generate
6569
echo "::endgroup::"
6670

0 commit comments

Comments
 (0)