]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: clear GOOS environment variable in TestScript/env_write
authorBryan C. Mills <bcmills@google.com>
Tue, 23 May 2023 03:28:50 +0000 (23:28 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 23 May 2023 04:38:43 +0000 (04:38 +0000)
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 <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>

src/cmd/go/testdata/script/env_write.txt

index 2e8b4391137b40b6ff2ca4c7753ebd7fdc5f9152..5d40949cddca436c67f9a3669196e008939f367d 100644 (file)
@@ -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