diff options
author | Russ Cox <rsc@golang.org> | 2015-07-07 17:51:20 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2015-07-07 21:53:11 +0000 |
commit | b6ead9f171742cd5b519a22ecc690354b0d1ce27 (patch) | |
tree | 6ee73e18168061fbf11d3f183af9934d6034de94 | |
parent | 9f90f31c3a3ac8fc306bb63c0fd80299afcddbc2 (diff) | |
download | go1.5beta1.tar.gz go1.5beta1.zip |
cmd/go: disable vendoredImportPath for code outside $GOPATHgo1.5beta1
It was crashing.
This fixes the build for
GO15VENDOREXPERIMENT=1 go test -short runtime
Fixes #11416.
Change-Id: I74a9114cdd8ebafcc9d2a6f40bf500db19c6e825
Reviewed-on: https://go-review.googlesource.com/11964
Reviewed-by: Russ Cox <rsc@golang.org>
-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) |