]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: do not miss an error if import path contains "cmd/something"
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>
Mon, 14 Apr 2014 20:01:27 +0000 (22:01 +0200)
committerJan Ziak <0xe2.0x9a.0x9b@gmail.com>
Mon, 14 Apr 2014 20:01:27 +0000 (22:01 +0200)
Fixes #7638

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/87300043

src/cmd/go/get.go

index e61da7e2ad270a6b8be698fcbfcaac89c4868a1e..fb9a4ae2350d9858ba49451d5b749573d5cb351f 100644 (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 {