mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00:00
../test: set GOPATH in nosplit.go
This test invokes 'go build', so in module mode it needs a module cache to guard edits to go.mod. Fixes #30776 Change-Id: I89ebef1fad718247e7f972cd830e31d6f4a83e4c Reviewed-on: https://go-review.googlesource.com/c/go/+/167085 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
53948127d3
commit
af13cfc3a2
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue