diff --git a/packages/@cdktf/hcl-tools/prebuild.sh b/packages/@cdktf/hcl-tools/prebuild.sh index 7fdfb6863e..4a845b274f 100755 --- a/packages/@cdktf/hcl-tools/prebuild.sh +++ b/packages/@cdktf/hcl-tools/prebuild.sh @@ -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 diff --git a/packages/@cdktf/hcl2json/prebuild.sh b/packages/@cdktf/hcl2json/prebuild.sh index 7fdfb6863e..4a845b274f 100755 --- a/packages/@cdktf/hcl2json/prebuild.sh +++ b/packages/@cdktf/hcl2json/prebuild.sh @@ -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