Commit 456642ad authored by Andrey Mirtchovski's avatar Andrey Mirtchovski Committed by Russ Cox

cmd/goinstall: include command name in error reporting (usually missing software…

cmd/goinstall: include command name in error reporting (usually missing software or incorrect $PATH)

R=rsc
CC=golang-dev
https://golang.org/cl/695041
parent eaf45f2d
......@@ -180,7 +180,8 @@ func quietRun(dir string, stdin []byte, cmd ...string) os.Error {
func genRun(dir string, stdin []byte, cmd []string, quiet bool) os.Error {
bin, err := exec.LookPath(cmd[0])
if err != nil {
return err
// report binary as well as the error
return os.NewError(cmd[0] + ": " + err.String())
}
p, err := exec.Run(bin, cmd, os.Environ(), dir, exec.Pipe, exec.Pipe, exec.MergeWithStdout)
if *verbose {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment