summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/images.go15
-rw-r--r--cmd/podman/pull.go1
2 files changed, 15 insertions, 1 deletions
diff --git a/cmd/podman/images.go b/cmd/podman/images.go
index 75cdd3465..115f30d9b 100644
--- a/cmd/podman/images.go
+++ b/cmd/podman/images.go
@@ -159,6 +159,21 @@ func imagesCmd(c *cliconfig.ImagesValues) error {
filters = append(filters, fmt.Sprintf("reference=%s", image))
}
+ var sortValues = map[string]bool{
+ "created": true,
+ "id": true,
+ "repository": true,
+ "size": true,
+ "tag": true,
+ }
+ if !sortValues[c.Sort] {
+ keys := make([]string, 0, len(sortValues))
+ for k := range sortValues {
+ keys = append(keys, k)
+ }
+ return errors.Errorf("invalid sort value %q, required values: %s", c.Sort, strings.Join(keys, ", "))
+ }
+
opts := imagesOptions{
quiet: c.Quiet,
noHeading: c.Noheading,
diff --git a/cmd/podman/pull.go b/cmd/podman/pull.go
index c6baf6b61..1cbb3f45e 100644
--- a/cmd/podman/pull.go
+++ b/cmd/podman/pull.go
@@ -55,7 +55,6 @@ func init() {
flags.StringVar(&pullCommand.Creds, "creds", "", "`Credentials` (USERNAME:PASSWORD) to use for authenticating to a registry")
flags.BoolVarP(&pullCommand.Quiet, "quiet", "q", false, "Suppress output information when pulling images")
flags.StringVar(&pullCommand.OverrideArch, "override-arch", "", "use `ARCH` instead of the architecture of the machine for choosing images")
- markFlagHidden(flags, "override-arch")
flags.StringVar(&pullCommand.OverrideOS, "override-os", "", "use `OS` instead of the running OS for choosing images")
markFlagHidden(flags, "override-os")
// Disabled flags for the remote client