summaryrefslogtreecommitdiff
path: root/cmd/podman/pods/inspect.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-15 19:58:19 +0200
committerGitHub <noreply@github.com>2020-09-15 19:58:19 +0200
commite7af517914600a97fac4e0341bb701aa178fbbb5 (patch)
tree4b34d10a5afe3a268967a696dfb885868608e09b /cmd/podman/pods/inspect.go
parent46280d6aba13af7a0b8173adb96c54afdd560da7 (diff)
parent2583948f72a05cf38dc9f0c4ec1feef64ab9c9af (diff)
downloadpodman-e7af517914600a97fac4e0341bb701aa178fbbb5.tar.gz
podman-e7af517914600a97fac4e0341bb701aa178fbbb5.tar.bz2
podman-e7af517914600a97fac4e0341bb701aa178fbbb5.zip
Merge pull request #7633 from edsantiago/minus_l_with_other_args
Usability: prevent "-l" with arguments
Diffstat (limited to 'cmd/podman/pods/inspect.go')
-rw-r--r--cmd/podman/pods/inspect.go3
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]