mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-30 19:51:58 +00:00
ReadOutput for process, and --wait will read process output
This commit is contained in:
@@ -176,17 +176,23 @@ func RunProcess(wait bool, label string, execPath string, args []string, input s
|
||||
|
||||
if wait {
|
||||
<-proc.WaitCh
|
||||
output := pcm.ReadOutput(proc)
|
||||
if proc.ExitState == nil {
|
||||
return &ResponseRunProcess{
|
||||
Success: true,
|
||||
Output: output,
|
||||
}, nil
|
||||
} else {
|
||||
return &ResponseRunProcess{
|
||||
Success: proc.ExitState.Success(), // Would be always false?
|
||||
Output: output,
|
||||
}, nil
|
||||
}
|
||||
} else {
|
||||
return &ResponseRunProcess{}, nil
|
||||
return &ResponseRunProcess{
|
||||
Success: true,
|
||||
Output: "",
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user