summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Mirtchovski <mirtchovski@gmail.com>2010-03-23 18:13:16 -0700
committerAndrey Mirtchovski <mirtchovski@gmail.com>2010-03-23 18:13:16 -0700
commitc9a1a03a5b6b553f3483cb1ad29b6aa0638697c6 (patch)
treea696685a39c8af41b7d1ff1fe6e89a163afcb2d8
parent50287a7afca0e40771f994cbe4eff462eca712ab (diff)
downloadgolang-c9a1a03a5b6b553f3483cb1ad29b6aa0638697c6.tar.gz
cmd/goinstall: include command name in error reporting (usually missing software or incorrect $PATH)
R=rsc CC=golang-dev http://codereview.appspot.com/695041 Committer: Russ Cox <rsc@golang.org>
-rw-r--r--src/cmd/goinstall/main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/goinstall/main.go b/src/cmd/goinstall/main.go
index 1be2bd600..bc6301baa 100644
--- a/src/cmd/goinstall/main.go
+++ b/src/cmd/goinstall/main.go
@@ -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 {