1
0
mirror of https://github.com/golang/go synced 2024-10-02 18:18:33 -06:00

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
This commit is contained in:
Jan Ziak 2014-04-14 22:01:27 +02:00
parent eb00dfbe64
commit 3f529f8e43

View File

@ -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 {