@@ -173,19 +173,7 @@ func doInstall(cmdline []string) {
173173 if flag .NArg () > 0 {
174174 packages = flag .Args ()
175175 }
176-
177- // Resolve ./... manually and remove vendor/bazil/fuse (fuse is not in windows)
178- out , err := goTool ("list" , "./..." ).CombinedOutput ()
179- if err != nil {
180- log .Fatalf ("package listing failed: %v\n %s" , err , string (out ))
181- }
182- packages = []string {}
183- for _ , line := range strings .Split (string (out ), "\n " ) {
184- if ! strings .Contains (line , "vendor" ) {
185- packages = append (packages , strings .TrimSpace (line ))
186- }
187- }
188-
176+ packages = build .ExpandPackagesNoVendor (packages )
189177
190178 if * arch == "" || * arch == runtime .GOARCH {
191179 goinstall := goTool ("install" , buildFlags (env )... )
@@ -284,19 +272,8 @@ func doTest(cmdline []string) {
284272 if len (flag .CommandLine .Args ()) > 0 {
285273 packages = flag .CommandLine .Args ()
286274 }
287- if len (packages ) == 1 && packages [0 ] == "./..." {
288- // Resolve ./... manually since go vet will fail on vendored stuff
289- out , err := goTool ("list" , "./..." ).CombinedOutput ()
290- if err != nil {
291- log .Fatalf ("package listing failed: %v\n %s" , err , string (out ))
292- }
293- packages = []string {}
294- for _ , line := range strings .Split (string (out ), "\n " ) {
295- if ! strings .Contains (line , "vendor" ) {
296- packages = append (packages , strings .TrimSpace (line ))
297- }
298- }
299- }
275+ packages = build .ExpandPackagesNoVendor (packages )
276+
300277 // Run analysis tools before the tests.
301278 if * vet {
302279 build .MustRun (goTool ("vet" , packages ... ))
0 commit comments