]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/goinstall: include command name in error reporting (usually missing software...
authorAndrey Mirtchovski <mirtchovski@gmail.com>
Wed, 24 Mar 2010 01:13:16 +0000 (18:13 -0700)
committerRuss Cox <rsc@golang.org>
Wed, 24 Mar 2010 01:13:16 +0000 (18:13 -0700)
R=rsc
CC=golang-dev
https://golang.org/cl/695041

src/cmd/goinstall/main.go

index 1be2bd600a8e22e0f4423569c8d94fd84c8ca617..bc6301baa2649ed5f6f51d54bb939cdd49b56aaf 100644 (file)
@@ -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 {