summaryrefslogtreecommitdiff
path: root/cmd/podman/volumes
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-15 15:13:51 +0100
committerGitHub <noreply@github.com>2020-11-15 15:13:51 +0100
commit392075631a284617b7e37b8bdfb3157f5918cdec (patch)
tree5b4d74bef8ff1a77c0bd5429c3f0076f6c07d90f /cmd/podman/volumes
parent9fa09a83b30c5d9300eb40b3d50b405153b37f7a (diff)
parent0dad2499a33e3d76eb4508a52c7449224ee1e10b (diff)
downloadpodman-392075631a284617b7e37b8bdfb3157f5918cdec.tar.gz
podman-392075631a284617b7e37b8bdfb3157f5918cdec.tar.bz2
podman-392075631a284617b7e37b8bdfb3157f5918cdec.zip
Merge pull request #8345 from afbjorklund/volume-filter
Add support for volume ls --filter label=key=value
Diffstat (limited to 'cmd/podman/volumes')
-rw-r--r--cmd/podman/volumes/list.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/volumes/list.go b/cmd/podman/volumes/list.go
index 5548c9c1b..b0d999765 100644
--- a/cmd/podman/volumes/list.go
+++ b/cmd/podman/volumes/list.go
@@ -73,11 +73,11 @@ func list(cmd *cobra.Command, args []string) error {
lsOpts.Filter = make(map[string][]string)
}
for _, f := range cliOpts.Filter {
- filterSplit := strings.Split(f, "=")
+ filterSplit := strings.SplitN(f, "=", 2)
if len(filterSplit) < 2 {
return errors.Errorf("filter input must be in the form of filter=value: %s is invalid", f)
}
- lsOpts.Filter[filterSplit[0]] = append(lsOpts.Filter[filterSplit[0]], filterSplit[1:]...)
+ lsOpts.Filter[filterSplit[0]] = append(lsOpts.Filter[filterSplit[0]], filterSplit[1])
}
responses, err := registry.ContainerEngine().VolumeList(context.Background(), lsOpts)
if err != nil {