Skip to content

Commit 342751a

Browse files
committed
cmd/go/testdata: don't set GOPATH=NUL in test
An upcoming change to the filepath package to make IsAbs("NUL")==false on Windows will cause this test to fail, since it sets GOPATH=NUL and GOPATH must be an absolute path. Set GOPATH to the name of a text file instead. (The intent is that GOPATH be set to a path that is not writable.) For #56217. Change-Id: I18e645fe11547d02d1a2e0e580085e6348c4009a Reviewed-on: https://go-review.googlesource.com/c/go/+/448896 Reviewed-by: Bryan Mills <[email protected]> Run-TryBot: Damien Neil <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 4f13067 commit 342751a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
env GO111MODULE=on
22

3-
env GOPATH=$devnull
3+
env GOPATH=$WORK${/}invalid-gopath
44

55
go list -m
66
stdout '^example.com$'
@@ -16,3 +16,6 @@ go 1.13
1616
package main
1717

1818
func main() {}
19+
20+
-- $WORK/invalid-gopath
21+
This is a text file, not a directory.

0 commit comments

Comments
 (0)