Commit 12576f9e authored by Alex Brainman's avatar Alex Brainman Committed by Russ Cox

goinstall: check for error from exec.*Cmd.Wait() before using its result

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1923043
parent 6b8ec5c5
......@@ -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 != "" {
......
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