mirror of https://github.com/docker/buildx.git
Merge pull request #2473 from tonistiigi/prune-negative-filter
prune: allow negative and prefix filters
This commit is contained in:
commit
2e7da01560
|
@ -195,6 +195,8 @@ func toBuildkitPruneInfo(f filters.Args) (*client.PruneInfo, error) {
|
|||
case 1:
|
||||
if filterKey == "id" {
|
||||
filters = append(filters, filterKey+"~="+values[0])
|
||||
} else if strings.HasSuffix(filterKey, "!") || strings.HasSuffix(filterKey, "~") {
|
||||
filters = append(filters, filterKey+"="+values[0])
|
||||
} else {
|
||||
filters = append(filters, filterKey+"=="+values[0])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue