From 3f529f8e43e3b9b78a399a1b0bdc789117dd96a7 Mon Sep 17 00:00:00 2001 From: Jan Ziak <0xe2.0x9a.0x9b@gmail.com> Date: Mon, 14 Apr 2014 22:01:27 +0200 Subject: [PATCH] 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 --- src/cmd/go/get.go | 4 ++++ 1 file changed, 4 insertions(+) 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 {