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>
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