From: Damien Neil Date: Wed, 9 Nov 2022 01:07:40 +0000 (-0800) Subject: cmd/go/testdata: don't set GOPATH=NUL in test X-Git-Tag: go1.20rc1~354 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=342751a695835fb99ad8b8f9b9f3f818e9086b86;p=gostls13.git 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 Run-TryBot: Damien Neil TryBot-Result: Gopher Robot --- diff --git a/src/cmd/go/testdata/script/mod_init_empty.txt b/src/cmd/go/testdata/script/mod_init_empty.txt index 1c3888caed..d197a79a67 100644 --- a/src/cmd/go/testdata/script/mod_init_empty.txt +++ b/src/cmd/go/testdata/script/mod_init_empty.txt @@ -1,6 +1,6 @@ env GO111MODULE=on -env GOPATH=$devnull +env GOPATH=$WORK${/}invalid-gopath go list -m stdout '^example.com$' @@ -16,3 +16,6 @@ go 1.13 package main func main() {} + +-- $WORK/invalid-gopath +This is a text file, not a directory.