Fixed --wait

This commit is contained in:
Jae Kwon
2015-04-16 10:54:07 -07:00
parent 5b9dbddc7b
commit 372cfb509d
3 changed files with 21 additions and 14 deletions
+10 -2
View File
@@ -165,8 +165,16 @@ func RunProcess(wait bool, label string, execPath string, args []string, input s
}
if wait {
exitErr := pcm.Wait(proc)
return nil, exitErr
<-proc.WaitCh
if proc.ExitState == nil {
return &ResponseRunProcess{
Success: true,
}, nil
} else {
return &ResponseRunProcess{
Success: proc.ExitState.Success(), // Would be always false?
}, nil
}
} else {
return &ResponseRunProcess{}, nil
}
+1
View File
@@ -10,6 +10,7 @@ type ResponseStatus struct {
}
type ResponseRunProcess struct {
Success bool
}
type ResponseStopProcess struct {