diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/save.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cmd/podman/save.go b/cmd/podman/save.go index 016fa580a..9f193a8f8 100644 --- a/cmd/podman/save.go +++ b/cmd/podman/save.go @@ -93,6 +93,12 @@ func saveCmd(c *cli.Context) error { return err } + source := args[0] + newImage, err := runtime.ImageRuntime().NewFromLocal(source) + if err != nil { + return err + } + var dst, manifestType string switch c.String("format") { case libpod.OCIArchive: @@ -119,11 +125,7 @@ func saveCmd(c *cli.Context) error { return err } } - source := args[0] - newImage, err := runtime.ImageRuntime().NewFromLocal(source) - if err != nil { - return err - } + dest := dst // need dest to be in the format transport:path:reference for the following transports if (strings.Contains(dst, libpod.OCIArchive) || strings.Contains(dst, libpod.DockerArchive)) && !strings.Contains(newImage.ID(), source) { |