mirror of https://github.com/docker/cli.git
completion: ContainerNames: don't panic on nil filter
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
21eea1e003
commit
b8cddc63ad
|
@ -59,7 +59,7 @@ func ContainerNames(dockerCLI APIClientProvider, all bool, filters ...func(conta
|
|||
for _, ctr := range list {
|
||||
skip := false
|
||||
for _, fn := range filters {
|
||||
if !fn(ctr) {
|
||||
if fn != nil && !fn(ctr) {
|
||||
skip = true
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue