Skip to content

Commit a0a6026

Browse files
committed
cmd/go/testdata/script: clear path in gotoolchain_issue66175
The gotoolchain_issue66175 script test would fail if a binary named go1.21 or go1.22 was present in the system PATH. Clear the path at the beginning of the test to make it independent of the system path. Fixes #67277 Change-Id: I6d9133aee5b20ab116e07b659e8ecf3eb8add4ed Reviewed-on: https://go-review.googlesource.com/c/go/+/584258 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent cf6124f commit a0a6026

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cmd/go/testdata/script/gotoolchain_issue66175.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
env TESTGO_VERSION=go1.14
22

3+
# Clear the path so this test doesn't fail if the system running it\
4+
# has a binary named go1.21 or go1.22 on its path.
5+
[GOOS:plan9] env path=
6+
[!GOOS:plan9] env PATH=
7+
38
# check for invalid toolchain in go.mod
49
go mod init m
510
go mod edit -go=1.14 -toolchain=go1.22

0 commit comments

Comments
 (0)