mirror of
https://github.com/golang/go
synced 2024-11-25 08:57:58 -07:00
goinstall: check for error from exec.*Cmd.Wait() before using its result
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/1923043
This commit is contained in:
parent
6b8ec5c572
commit
12576f9e70
@ -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 != "" {
|
||||
|
Loading…
Reference in New Issue
Block a user