summaryrefslogtreecommitdiff
path: root/cmd/podman/save.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2018-07-28 04:11:15 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-01 18:22:59 +0000
commit90abdfdff52a8b243f96639793ab5a3499fed1ab (patch)
tree514ddead261d6971b6a3e2ffed7dc1e6c168f9e3 /cmd/podman/save.go
parenta5c1cecbeaebf44401b9c666d9d544f4d5aafdb4 (diff)
downloadpodman-90abdfdff52a8b243f96639793ab5a3499fed1ab.tar.gz
podman-90abdfdff52a8b243f96639793ab5a3499fed1ab.tar.bz2
podman-90abdfdff52a8b243f96639793ab5a3499fed1ab.zip
RFC? Hard-code "format" string values instead of using libpod.* transport names
We don't really want to change the names of the CLI options just because the transport names change (with oci-dir/docker-dir there is no direct correspondence wanyway), and this removes a dependency. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1176 Approved by: rhatdan
Diffstat (limited to 'cmd/podman/save.go')
-rw-r--r--cmd/podman/save.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/cmd/podman/save.go b/cmd/podman/save.go
index a60403b64..6a0d12885 100644
--- a/cmd/podman/save.go
+++ b/cmd/podman/save.go
@@ -15,7 +15,6 @@ import (
imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
"github.com/projectatomic/libpod/cmd/podman/libpodruntime"
- "github.com/projectatomic/libpod/libpod"
libpodImage "github.com/projectatomic/libpod/libpod/image"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
@@ -106,7 +105,7 @@ func saveCmd(c *cli.Context) error {
var destRef types.ImageReference
var manifestType string
switch c.String("format") {
- case libpod.OCIArchive:
+ case "oci-archive":
destImageName := imageNameForSaveDestination(newImage, source)
destRef, err = ociarchive.NewReference(output, destImageName) // destImageName may be ""
if err != nil {
@@ -124,9 +123,7 @@ func saveCmd(c *cli.Context) error {
return errors.Wrapf(err, "error getting directory ImageReference for %q", output)
}
manifestType = manifest.DockerV2Schema2MediaType
- case libpod.DockerArchive:
- fallthrough
- case "":
+ case "docker-archive", "":
dst := output
destImageName := imageNameForSaveDestination(newImage, source)
if destImageName != "" {