diff options
| author | Bryan C. Mills <bcmills@google.com> | 2022-04-05 14:25:34 -0400 |
|---|---|---|
| committer | Bryan Mills <bcmills@google.com> | 2022-04-05 21:45:19 +0000 |
| commit | 69756b38f25bf72f1040dd7fd243febba89017e6 (patch) | |
| tree | 54fc0ed6abf02e62db9266961cf5c2f855e98a44 /src/run.bash | |
| parent | 5a6a830c1ceafd551937876f11590fd60aea1799 (diff) | |
| download | go-69756b38f25bf72f1040dd7fd243febba89017e6.tar.xz | |
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 <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/run.bash')
| -rwxr-xr-x | src/run.bash | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/run.bash b/src/run.bash index 2123c509f8..99b09fcbde 100755 --- a/src/run.bash +++ b/src/run.bash @@ -21,14 +21,10 @@ if [ ! -f ../bin/go ]; then exit 1 fi -eval $(../bin/go env) +eval $(../bin/go tool dist env) export GOROOT # The api test requires GOROOT to be set, so set it to match ../bin/go. -export GOPATH=/nonexist-gopath unset CDPATH # in case user has it set -export GOBIN=$GOROOT/bin # Issue 14340 -unset GOFLAGS -unset GO111MODULE export GOHOSTOS export CC @@ -53,4 +49,5 @@ if ulimit -T &> /dev/null; then [ "$(ulimit -H -T)" = "unlimited" ] || ulimit -S -T $(ulimit -H -T) fi +export GOPATH=/nonexist-gopath exec ../bin/go tool dist test -rebuild "$@" |
