diff --git a/test/nosplit.go b/test/nosplit.go index 46810b1a2f8..266e6077b1f 100644 --- a/test/nosplit.go +++ b/test/nosplit.go @@ -217,6 +217,7 @@ func main() { return } defer os.RemoveAll(dir) + os.Setenv("GOPATH", filepath.Join(dir, "_gopath")) if err := ioutil.WriteFile(filepath.Join(dir, "go.mod"), []byte("module go-test-nosplit\n"), 0666); err != nil { log.Panic(err)