diff options
-rw-r--r-- | src/cmd/go/pkg.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/pkg.go b/src/cmd/go/pkg.go index 51567b5afb..f949d4e9f2 100644 --- a/src/cmd/go/pkg.go +++ b/src/cmd/go/pkg.go @@ -355,7 +355,7 @@ func isDir(path string) bool { // it searched along the way, to help prepare a useful error message should path turn // out not to exist. func vendoredImportPath(parent *Package, path string) (found string, searched []string) { - if parent == nil || !go15VendorExperiment { + if parent == nil || parent.Root == "" || !go15VendorExperiment { return path, nil } dir := filepath.Clean(parent.Dir) |