Commit 3f529f8e authored by Jan Ziak's avatar Jan Ziak

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
parent eb00dfbe
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment