diff options
Diffstat (limited to 'cmd/kpod/save.go')
-rw-r--r-- | cmd/kpod/save.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/kpod/save.go b/cmd/kpod/save.go index 287821f0a..0f5fcfa4d 100644 --- a/cmd/kpod/save.go +++ b/cmd/kpod/save.go @@ -91,6 +91,9 @@ func saveCmd(c *cli.Context) error { for _, image := range args { dest := dst + ":" + image if err := runtime.PushImage(image, dest, saveOpts); err != nil { + if err2 := os.Remove(output); err2 != nil { + logrus.Errorf("error deleting %q: %v", output, err) + } return errors.Wrapf(err, "unable to save %q", image) } } |