Log runtime error message on delete error

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-06-30 14:08:43 -07:00
parent 2e4e484237
commit 3dfa04b2f4

View file

@ -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
} }