reaper: Return an error if exit status is not 0
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
92772bd471
commit
a6fb9bc111
@ -90,6 +90,9 @@ func (m *Monitor) Wait(c *exec.Cmd, ec chan runc.Exit) (int, error) {
|
||||
// make sure we flush all IO
|
||||
c.Wait()
|
||||
m.Unsubscribe(ec)
|
||||
if e.Status != 0 {
|
||||
return e.Status, errors.New("unsucessful command")
|
||||
}
|
||||
return e.Status, nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user