Show --external containers even without --all option

We currently do not show --external containers when the user specifies
it, unless they also specify the --all flag. This has led to confusion.
I see no reason not to list them without the --all flag if the user
specifies the option.

Fixes: https://github.com/containers/podman/issues/12353

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2021-12-14 16:03:19 -05:00
parent c36fb8b113
commit 51a4bef2e6
3 changed files with 8 additions and 8 deletions

View File

@ -74,7 +74,7 @@ func GetContainerLists(runtime *libpod.Runtime, options entities.ContainerListOp
}
}
if options.All && options.External {
if options.External {
listCon, err := GetExternalContainerLists(runtime)
if err != nil {
return nil, err