Merge pull request #204 from mlaventure/checkpoint-error-output

Return runtime output on checkpoint operation errors
This commit is contained in:
Michael Crosby 2016-04-18 10:53:15 -07:00
commit 2239d4e329

View file

@ -133,7 +133,11 @@ func (c *container) Checkpoint(cpt Checkpoint) error {
add("--ext-unix-sk")
}
add(c.id)
return exec.Command(c.runtime, args...).Run()
out, err := exec.Command(c.runtime, args...).CombinedOutput()
if err != nil {
return fmt.Errorf("%s: %s", err.Error(), string(out))
}
return err
}
func (c *container) DeleteCheckpoint(name string) error {