diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 3cd3454d5a0..3ce32388d05 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -216,6 +216,7 @@ func TestMain(m *testing.M) { } // Don't let these environment variables confuse the test. os.Setenv("GOENV", "off") + os.Unsetenv("GOFLAGS") os.Unsetenv("GOBIN") os.Unsetenv("GOPATH") os.Unsetenv("GIT_ALLOW_PROTOCOL")