From 69756b38f25bf72f1040dd7fd243febba89017e6 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Tue, 5 Apr 2022 14:25:34 -0400 Subject: cmd/dist: move more environment logic into cmd/dist from make and run scripts 'go tool dist env' outputs different (and fewer) environment variables than 'go env'. The 'go tool dist env' variables should be authoritative, whereas many printed by 'go env' are merely informational (and not intended to be overridden in the actual environment). Fixes #52009 Change-Id: Ic0590153875183135cebf7ca55ead7c2b4038569 Reviewed-on: https://go-review.googlesource.com/c/go/+/398061 Trust: Bryan Mills Run-TryBot: Bryan Mills Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot --- src/make.bash | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/make.bash') diff --git a/src/make.bash b/src/make.bash index e517a1bda9..ab2ce19f4e 100755 --- a/src/make.bash +++ b/src/make.bash @@ -73,12 +73,6 @@ set -e -export GOENV=off -export GOWORK=off # Issue 51558 -unset GOBIN # Issue 14340 -unset GOFLAGS -unset GO111MODULE - if [ ! -f run.bash ]; then echo 'make.bash must be run from $GOROOT/src' 1>&2 exit 1 @@ -204,7 +198,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then exit 1 fi rm -f cmd/dist/dist -GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off GOEXPERIMENT="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist +GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off GOEXPERIMENT="" GOENV=off GOFLAGS="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist # -e doesn't propagate out of eval, so check success by hand. eval $(./cmd/dist/dist env -p || echo FAIL=true) -- cgit v1.3