mirror of
https://github.com/golang/go
synced 2024-10-02 16:18:38 -06:00
cmd/go: fix error message on non-existing tools.
R=golang-dev, rsc CC=golang-dev, remy https://golang.org/cl/5617053
This commit is contained in:
parent
25787acb3c
commit
e489ab8ecc
@ -55,7 +55,7 @@ func runTool(cmd *Command, args []string) {
|
|||||||
switch {
|
switch {
|
||||||
case 'a' <= c && c <= 'z', '0' <= c && c <= '9':
|
case 'a' <= c && c <= 'z', '0' <= c && c <= '9':
|
||||||
default:
|
default:
|
||||||
fmt.Fprintf(os.Stderr, "go tool: bad tool name %q\n", tool)
|
fmt.Fprintf(os.Stderr, "go tool: bad tool name %q\n", toolName)
|
||||||
setExitStatus(2)
|
setExitStatus(2)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ func runTool(cmd *Command, args []string) {
|
|||||||
toolPath := tool(toolName)
|
toolPath := tool(toolName)
|
||||||
// Give a nice message if there is no tool with that name.
|
// Give a nice message if there is no tool with that name.
|
||||||
if _, err := os.Stat(toolPath); err != nil {
|
if _, err := os.Stat(toolPath); err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "go tool: no such tool %q\n", tool)
|
fmt.Fprintf(os.Stderr, "go tool: no such tool %q\n", toolName)
|
||||||
setExitStatus(3)
|
setExitStatus(3)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user