]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: skip stat check when using -toolexec
authorDavid Crawshaw <crawshaw@golang.org>
Mon, 16 Feb 2015 19:22:22 +0000 (14:22 -0500)
committerDavid Crawshaw <crawshaw@golang.org>
Tue, 17 Feb 2015 12:21:45 +0000 (12:21 +0000)
Change-Id: Idc88b1ee950e33cfe757a27e9a3383d879793af7
Reviewed-on: https://go-review.googlesource.com/4934
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/tool.go

index dc8d34ba089738b10c33882deb357bcd43df99b6..29feb1d3b2a464af11bc7cfd2ca30a909d2b952b 100644 (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) {