diff options
author | Ed Santiago <santiago@redhat.com> | 2020-09-14 15:19:34 -0600 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2020-09-14 15:49:28 -0600 |
commit | 2583948f72a05cf38dc9f0c4ec1feef64ab9c9af (patch) | |
tree | afd22aba6b816495c6b764f59e84ea6c1406a192 /cmd/podman/pods | |
parent | fd7cdb25027bb33c33eacb99f1a02838eca5d684 (diff) | |
download | podman-2583948f72a05cf38dc9f0c4ec1feef64ab9c9af.tar.gz podman-2583948f72a05cf38dc9f0c4ec1feef64ab9c9af.tar.bz2 podman-2583948f72a05cf38dc9f0c4ec1feef64ab9c9af.zip |
Usability: prevent "-l" with arguments
Add new system check confirming that "podman foo -l arg"
throws an error; and fix lots of instances where code
was not doing this check.
I'll probably need to add something similar for --all but
that can wait.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r-- | cmd/podman/pods/inspect.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/podman/pods/inspect.go b/cmd/podman/pods/inspect.go index 8f5aa6062..bc20352b0 100644 --- a/cmd/podman/pods/inspect.go +++ b/cmd/podman/pods/inspect.go @@ -46,6 +46,9 @@ func inspect(cmd *cobra.Command, args []string) error { if len(args) < 1 && !inspectOptions.Latest { return errors.Errorf("you must provide the name or id of a running pod") } + if len(args) > 0 && inspectOptions.Latest { + return errors.Errorf("--latest and containers cannot be used together") + } if !inspectOptions.Latest { inspectOptions.NameOrID = args[0] |