Skip to content

Commit

Permalink
cmd/go: avoid when go.env contain GOTOOLCHAIN=local test fail
Browse files Browse the repository at this point in the history
Fixes golang#67793

Change-Id: Idb079c18c9f4565d95fbf979c73e578872d3732f
  • Loading branch information
qiulaidongfeng committed Jun 4, 2024
1 parent 9b43bfb commit 12b6246
Showing 1 changed file with 8 additions and 1 deletion.
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

0 comments on commit 12b6246

Please sign in to comment.