]> Cypherpunks repositories - gostls13.git/commitdiff
run: set GOENV=off when running 'go tool dist env'
authorBryan C. Mills <bcmills@google.com>
Thu, 28 Jul 2022 19:29:38 +0000 (15:29 -0400)
committerBryan Mills <bcmills@google.com>
Wed, 17 Aug 2022 20:19:28 +0000 (20:19 +0000)
'go tool' sets environment variables, including the GOAMD64 value
from the user's go.env file.

'go tool dist test' then rebuilds and reinstalls the toolchain and
standard library based on those variables. It should not; instead, it
should test exactly the configuration installed by the make scripts.

Fixes #54084.

Change-Id: I7cc8a21cc1d8331e06d7b7c55b14d170f8e2faab
Reviewed-on: https://go-review.googlesource.com/c/go/+/420055
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/run.bash
src/run.bat
src/run.rc

index 99b09fcbde977638f256c0b3860a06617bc3313f..4f4d4373650e6ba693ac69f58f61c83ca4586e87 100755 (executable)
@@ -21,6 +21,7 @@ if [ ! -f ../bin/go ]; then
        exit 1
 fi
 
+export GOENV=off
 eval $(../bin/go tool dist env)
 export GOROOT   # The api test requires GOROOT to be set, so set it to match ../bin/go.
 
index 74bf8a4d8d914bd9eb936aacdb5cf3de0cd3fbbc..35c8ead8cb22473e96605ceb9474cb661c705d34 100644 (file)
@@ -18,6 +18,7 @@ setlocal
 \r
 set GOBUILDFAIL=0\r
 \r
+set GOENV=off\r
 ..\bin\go tool dist env > env.bat\r
 if errorlevel 1 goto fail\r
 call .\env.bat\r
index 2a0bb7f7a1f82b4b4edd2a28e6cb303e647d5b2c..704290ca5ed1fdcc1a2016bf84e03155aa972741 100755 (executable)
@@ -10,6 +10,7 @@ if(! test -f ../bin/go){
        exit wrongdir
 }
 
+GOENV=off
 eval `{../bin/go tool dist env}
 
 GOPATH=/nonexist-gopath