diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-06-09 09:24:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 09:24:44 +0200 |
commit | a2e1df80bcf71c11d10cc78b49fab4b8909b86e5 (patch) | |
tree | af98954e78bf852d9ff5c5a1ba6e822bef9a6624 /cmd/podman | |
parent | da1bade294025a419877484ae35f352984e804d2 (diff) | |
parent | a5ad36c65ea07d839fd9bf55a820c8cb9884eed1 (diff) | |
download | podman-a2e1df80bcf71c11d10cc78b49fab4b8909b86e5.tar.gz podman-a2e1df80bcf71c11d10cc78b49fab4b8909b86e5.tar.bz2 podman-a2e1df80bcf71c11d10cc78b49fab4b8909b86e5.zip |
Merge pull request #10390 from jmguzik/fix-cmd-prune-filter-images
Fix image prune --filter cmd behavior
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/images/prune.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/podman/images/prune.go b/cmd/podman/images/prune.go index a082255f6..6ecf4f2aa 100644 --- a/cmd/podman/images/prune.go +++ b/cmd/podman/images/prune.go @@ -59,7 +59,15 @@ func prune(cmd *cobra.Command, args []string) error { return nil } } - + filterMap, err := common.ParseFilters(filter) + if err != nil { + return err + } + for k, v := range filterMap { + for _, val := range v { + pruneOpts.Filter = append(pruneOpts.Filter, fmt.Sprintf("%s=%s", k, val)) + } + } results, err := registry.ImageEngine().Prune(registry.GetContext(), pruneOpts) if err != nil { return err |