mirror of
https://github.com/docker/buildx.git
synced 2024-11-22 15:37:16 +08:00
prune: fix filter until option
Previously, when specifying the filter option with the until value, no cache would be cleaned, preventing users from clearing by time. This bug arises from passing the until field through into buildkit, where, on filtering, a non-existent field returns false for a match. The fix is simple, as we build up our list of filters to pass to buildkit, we skip over the until key, so create a valid list of filters for buildkit. Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
parent
f360088ae7
commit
febcc25d1a
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user