diff options
Diffstat (limited to 'cmd/podman/build.go')
-rw-r--r-- | cmd/podman/build.go | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/cmd/podman/build.go b/cmd/podman/build.go index e35fd10a4..6671c18c7 100644 --- a/cmd/podman/build.go +++ b/cmd/podman/build.go @@ -77,16 +77,9 @@ func buildCmd(c *cli.Context) error { } dockerfiles := getDockerfiles(c.StringSlice("file")) - format := "oci" - if c.IsSet("format") { - format = strings.ToLower(c.String("format")) - } - if strings.HasPrefix(format, "oci") { - format = imagebuildah.OCIv1ImageFormat - } else if strings.HasPrefix(format, "docker") { - format = imagebuildah.Dockerv2ImageFormat - } else { - return errors.Errorf("unrecognized image type %q", format) + format, err := getFormat(c) + if err != nil { + return nil } contextDir := "" cliArgs := c.Args() |