From: Alex Brainman Date: Thu, 5 Aug 2010 00:18:57 +0000 (-0700) Subject: goinstall: check for error from exec.*Cmd.Wait() before using its result X-Git-Tag: weekly.2010-08-04~7 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=12576f9e7052e278c2b6e415b97e9ef34da1e6a4;p=gostls13.git goinstall: check for error from exec.*Cmd.Wait() before using its result R=golang-dev, rsc CC=golang-dev https://golang.org/cl/1923043 --- diff --git a/src/cmd/goinstall/main.go b/src/cmd/goinstall/main.go index 60efdf082f..5d2af2e7ca 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 != "" {