Skip to content

Commit 955d0e9

Browse files
icholyDanielMSchmidt
authored andcommitted
fix: use 'go env GOROOT' when GOROOT env is missing
1 parent 6f168d4 commit 955d0e9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/@cdktf/hcl-tools/prebuild.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
set -euo pipefail
66

7+
GOROOT="${GOROOT:-$(go env GOROOT)}"
8+
79
if [[ -z "${GOROOT-}" ]]; then
810
echo "GOROOT environment variable needs to be set!"
911
exit 1

packages/@cdktf/hcl2json/prebuild.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
set -euo pipefail
66

7+
GOROOT="${GOROOT:-$(go env GOROOT)}"
8+
79
if [[ -z "${GOROOT-}" ]]; then
810
echo "GOROOT environment variable needs to be set!"
911
exit 1

0 commit comments

Comments
 (0)