Skip to content

Commit

Permalink
fix: use 'go env GOROOT' when GOROOT env is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
icholy committed Oct 20, 2024
1 parent 0642f23 commit c5f0548
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/@cdktf/hcl-tools/prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

set -euo pipefail

GOROOT="${GOROOT:-$(go env GOROOT)}"

if [[ -z "${GOROOT-}" ]]; then
echo "GOROOT environment variable needs to be set!"
exit 1
Expand Down
2 changes: 2 additions & 0 deletions packages/@cdktf/hcl2json/prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

set -euo pipefail

GOROOT="${GOROOT:-$(go env GOROOT)}"

if [[ -z "${GOROOT-}" ]]; then
echo "GOROOT environment variable needs to be set!"
exit 1
Expand Down

0 comments on commit c5f0548

Please sign in to comment.