diff options
| author | Bryan C. Mills <bcmills@google.com> | 2023-05-22 23:28:50 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2023-05-23 04:38:43 +0000 |
| commit | e4e8f9b8ffff9d1bcbaaf4b98307d0b88c26678f (patch) | |
| tree | 03a4bb8c74f4f930b0d653dd3e080a516e4c3dbb | |
| parent | 88704b18ce9db36c04d788b688c42ef372ec2a5e (diff) | |
| download | go-e4e8f9b8ffff9d1bcbaaf4b98307d0b88c26678f.tar.xz | |
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 <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
| -rw-r--r-- | src/cmd/go/testdata/script/env_write.txt | 1 |
1 files changed, 1 insertions, 0 deletions
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 |
