From: Jan Ziak <0xe2.0x9a.0x9b@gmail.com> Date: Mon, 14 Apr 2014 20:01:27 +0000 (+0200) Subject: cmd/go: do not miss an error if import path contains "cmd/something" X-Git-Tag: go1.3beta1~89 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3f529f8e43e3b9b78a399a1b0bdc789117dd96a7;p=gostls13.git cmd/go: do not miss an error if import path contains "cmd/something" Fixes #7638 LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/87300043 --- diff --git a/src/cmd/go/get.go b/src/cmd/go/get.go index e61da7e2ad..fb9a4ae235 100644 --- a/src/cmd/go/get.go +++ b/src/cmd/go/get.go @@ -143,6 +143,10 @@ var downloadRootCache = map[string]bool{} // for the package named by the argument. func download(arg string, stk *importStack, getTestDeps bool) { p := loadPackage(arg, stk) + if p.Error != nil { + errorf("%s", p.Error) + return + } // There's nothing to do if this is a package in the standard library. if p.Standard {