Log runtime error message on delete error
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
2e4e484237
commit
3dfa04b2f4
1 changed files with 2 additions and 2 deletions
|
@ -246,8 +246,8 @@ func (c *container) Delete() error {
|
||||||
|
|
||||||
args := c.runtimeArgs
|
args := c.runtimeArgs
|
||||||
args = append(args, "delete", c.id)
|
args = append(args, "delete", c.id)
|
||||||
if derr := exec.Command(c.runtime, args...).Run(); err == nil {
|
if b, derr := exec.Command(c.runtime, args...).CombinedOutput(); err != nil {
|
||||||
err = derr
|
err = fmt.Errorf("%s: %q", derr, string(b))
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue