From e4e8f9b8ffff9d1bcbaaf4b98307d0b88c26678f Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Mon, 22 May 2023 23:28:50 -0400 Subject: [PATCH] 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 --- src/cmd/go/testdata/script/env_write.txt | 1 + 1 file changed, 1 insertion(+) 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 -- 2.50.0