From: Bryan C. Mills Date: Tue, 23 May 2023 03:28:50 +0000 (-0400) Subject: cmd/go: clear GOOS environment variable in TestScript/env_write X-Git-Tag: go1.21rc1~366 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e4e8f9b8ffff9d1bcbaaf4b98307d0b88c26678f;p=gostls13.git cmd/go: clear GOOS environment variable in TestScript/env_write Also clear the GOOS and GOARCH from the env file before testing other environment variables. This fixes various builders after CL 496957. Change-Id: Ib0308ca48f9e64c1c872f1d26a92a1dedf6330f9 Reviewed-on: https://go-review.googlesource.com/c/go/+/497256 Reviewed-by: Russ Cox TryBot-Result: Gopher Robot Auto-Submit: Bryan Mills Run-TryBot: Bryan Mills --- diff --git a/src/cmd/go/testdata/script/env_write.txt b/src/cmd/go/testdata/script/env_write.txt index 2e8b439113..5d40949cdd 100644 --- a/src/cmd/go/testdata/script/env_write.txt +++ b/src/cmd/go/testdata/script/env_write.txt @@ -173,6 +173,7 @@ go env -w GOOS=linux GOARCH=mips env GOOS=windows ! go env -u GOOS stderr 'unsupported GOOS/GOARCH.*windows/mips$' +env GOOS= # go env -w should reject relative paths in GOMODCACHE environment. ! go env -w GOMODCACHE=~/test