1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:04:44 -07:00

cmd/go: skip stat check when using -toolexec

Change-Id: Idc88b1ee950e33cfe757a27e9a3383d879793af7
Reviewed-on: https://go-review.googlesource.com/4934
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
David Crawshaw 2015-02-16 14:22:22 -05:00
parent f20826692b
commit 04774336b1

View File

@ -50,6 +50,9 @@ func tool(toolName string) string {
if toolIsWindows {
toolPath += toolWindowsExtension
}
if len(buildToolExec) > 0 {
return toolPath
}
// Give a nice message if there is no tool with that name.
if _, err := os.Stat(toolPath); err != nil {
if isInGoToolsRepo(toolName) {