From 2583948f72a05cf38dc9f0c4ec1feef64ab9c9af Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 14 Sep 2020 15:19:34 -0600 Subject: 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 --- cmd/podman/inspect/inspect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/podman/inspect/inspect.go') diff --git a/cmd/podman/inspect/inspect.go b/cmd/podman/inspect/inspect.go index 13c6544bb..f29527412 100644 --- a/cmd/podman/inspect/inspect.go +++ b/cmd/podman/inspect/inspect.go @@ -93,7 +93,7 @@ func (i *inspector) inspect(namesOrIDs []string) error { tmpType := i.options.Type if i.options.Latest { if len(namesOrIDs) > 0 { - return errors.New("latest and containers are not allowed") + return errors.New("--latest and containers cannot be used together") } tmpType = ContainerType // -l works with --type=all } -- cgit v1.2.3-54-g00ecf