summaryrefslogtreecommitdiff
path: root/cmd/kpod/save.go
diff options
context:
space:
mode:
authorUrvashi Mohnani <umohnani@redhat.com>2017-11-02 15:31:49 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2017-11-07 19:16:31 +0000
commit23979f8e0644cd1e05e05b0fc9bcb4a1fe42bb82 (patch)
treedc018440069dece8df8f57de65cdbb46bb06350d /cmd/kpod/save.go
parentd086beb7abc5ed002fe699ab02792aa47d50d581 (diff)
downloadpodman-23979f8e0644cd1e05e05b0fc9bcb4a1fe42bb82.tar.gz
podman-23979f8e0644cd1e05e05b0fc9bcb4a1fe42bb82.tar.bz2
podman-23979f8e0644cd1e05e05b0fc9bcb4a1fe42bb82.zip
Add 'kpod import' command
Imports a tarball and saves it as a filesystem image Signed-off-by: Urvashi Mohnani <umohnani@redhat.com> Closes: #12 Approved by: rhatdan
Diffstat (limited to 'cmd/kpod/save.go')
-rw-r--r--cmd/kpod/save.go3
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)
}
}