diff --git a/commands/prune.go b/commands/prune.go index 237ce9ed..4040b8b3 100644 --- a/commands/prune.go +++ b/commands/prune.go @@ -176,6 +176,10 @@ func toBuildkitPruneInfo(f filters.Args) (*client.PruneInfo, error) { bkFilter := make([]string, 0, f.Len()) for _, field := range f.Keys() { + if field == filterKey { + continue + } + values := f.Get(field) switch len(values) { case 0: