Skip to content

cmd/go: avoid when go.env contain GOTOOLCHAIN=local test fail #67807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/cmd/go/testdata/script/env_changed.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Test query for non-defaults in the env

env GOROOT=./a
env GOTOOLCHAIN=local
env GOSUMDB=nodefault
env GOPROXY=nodefault
Expand Down Expand Up @@ -44,13 +45,19 @@ go env -changed -json GOARCH
[GOARCH:amd64] stdout '"GOARCH": "arm64"'
[!GOARCH:amd64] stdout '"GOARCH": "amd64"'

env GOROOT=./a
env GOPROXY=s
go env -changed GOPROXY
! stdout 'GOPROXY'
env GOPROXY=s2
go env -changed GOPROXY
stdout 'GOPROXY=''?s2''?'

env GOROOT=./b
go env -changed
! stdout 'GOTOOLCHAIN=''?local''?'

-- a/go.env --
GOPROXY=s

-- b/go.env --
GOTOOLCHAIN=local