diff --git a/imports/fix_test.go b/imports/fix_test.go index 62c6f3c3..e2873008 100644 --- a/imports/fix_test.go +++ b/imports/fix_test.go @@ -1214,13 +1214,16 @@ func withEmptyGoPath(fn func()) { oldGOPATH := build.Default.GOPATH oldGOROOT := build.Default.GOROOT + oldCompiler := build.Default.Compiler build.Default.GOPATH = "" + build.Default.Compiler = "gc" testHookScanDir = func(string) {} defer func() { testHookScanDir = func(string) {} build.Default.GOPATH = oldGOPATH build.Default.GOROOT = oldGOROOT + build.Default.Compiler = oldCompiler }() fn()