diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 3e595d187f3..8a0416089c0 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -2320,8 +2320,7 @@ func TestGoVetWithExternalTests(t *testing.T) { tg := testgo(t) defer tg.cleanup() tg.makeTempdir() - tg.setenv("GOPATH", tg.path(".")) - tg.run("get", "golang.org/x/tools/cmd/vet") + tg.run("install", "cmd/vet") tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata")) tg.runFail("vet", "vetpkg") tg.grepBoth("missing argument for Printf", "go vet vetpkg did not find missing argument for Printf") @@ -2333,8 +2332,7 @@ func TestGoVetWithTags(t *testing.T) { tg := testgo(t) defer tg.cleanup() tg.makeTempdir() - tg.setenv("GOPATH", tg.path(".")) - tg.run("get", "golang.org/x/tools/cmd/vet") + tg.run("install", "cmd/vet") tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata")) tg.runFail("vet", "-tags", "tagtest", "vetpkg") tg.grepBoth(`c\.go.*wrong number of args for format`, "go get vetpkg did not run scan tagged file")