summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2010-08-04 17:18:57 -0700
committerAlex Brainman <alex.brainman@gmail.com>2010-08-04 17:18:57 -0700
commiteb3fd945e19d6374df7c70aa010f02dd654a5bc6 (patch)
tree3003f795ba959536f23c663f9993c7a05ecc2c99
parente51549f7eac89430dc5cf5fabb9dd78a73092d0e (diff)
downloadgo-eb3fd945e19d6374df7c70aa010f02dd654a5bc6.tar.gz
goinstall: check for error from exec.*Cmd.Wait() before using its result
R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/1923043 Committer: Russ Cox <rsc@golang.org>
-rw-r--r--src/cmd/goinstall/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/goinstall/main.go b/src/cmd/goinstall/main.go
index 60efdf082..5d2af2e7c 100644
--- a/src/cmd/goinstall/main.go
+++ b/src/cmd/goinstall/main.go
@@ -207,6 +207,9 @@ func genRun(dir string, stdin []byte, cmd []string, quiet bool) os.Error {
io.Copy(&buf, p.Stdout)
w, err := p.Wait(0)
p.Close()
+ if err != nil {
+ return err
+ }
if !w.Exited() || w.ExitStatus() != 0 {
if !quiet || *verbose {
if dir != "" {