diff --git a/.gitignore b/.gitignore index bc8f9617..b0998829 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .cache +.gocache vendor cmd/protoc-gen-go/protoc-gen-go cmd/protoc-gen-go/testdata/go.sum diff --git a/integration_test.go b/integration_test.go index f483c91d..bc3944d4 100644 --- a/integration_test.go +++ b/integration_test.go @@ -250,8 +250,8 @@ func mustInitDeps(t *testing.T) { // Explicitly clear GOROOT, so each toolchain uses their default GOROOT. check(os.Unsetenv("GOROOT")) - // Set a cache directory within the test directory. - check(os.Setenv("GOCACHE", filepath.Join(testDir, "gocache"))) + // Set a cache directory outside the test directory. + check(os.Setenv("GOCACHE", filepath.Join(repoRoot, ".gocache"))) // Setup GOPATH for pre-module support (i.e., go1.10 and earlier). goPath = filepath.Join(testDir, "gopath")