diff options
-rw-r--r-- | go/packages/packagestest/modules.go | 1 | ||||
-rw-r--r-- | internal/imports/mod_test.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/go/packages/packagestest/modules.go b/go/packages/packagestest/modules.go index 4608766ac..42b62067a 100644 --- a/go/packages/packagestest/modules.go +++ b/go/packages/packagestest/modules.go @@ -163,6 +163,7 @@ func (modules) Finalize(exported *Exported) error { exported.Config.Env = append(exported.Config.Env, "GO111MODULE=on", "GOPATH="+filepath.Join(exported.temp, "modcache"), + "GOMODCACHE=", "GOPROXY="+proxydir.ToURL(modProxyDir), "GOSUMDB=off", ) diff --git a/internal/imports/mod_test.go b/internal/imports/mod_test.go index 5d73c8813..c6bbe56c2 100644 --- a/internal/imports/mod_test.go +++ b/internal/imports/mod_test.go @@ -688,6 +688,7 @@ func setup(t *testing.T, main, wd string) *modTest { env := &ProcessEnv{ Env: map[string]string{ "GOPATH": filepath.Join(dir, "gopath"), + "GOMODCACHE": "", "GO111MODULE": "on", "GOSUMDB": "off", "GOPROXY": proxydir.ToURL(proxyDir), |