summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-06 23:39:52 +0000
committerGitHub <noreply@github.com>2020-11-06 23:39:52 +0000
commite2b82e6245ed9459a37dc004a2b1d593d2835cb7 (patch)
tree14c207872b083140739b5589d4c263daf1d353eb /libpod
parentdc58d4e2858bf6688a775277adf8f775afc30e73 (diff)
parent708d62078d2174cf2d7522b919348ebc12a1be19 (diff)
downloadpodman-e2b82e6245ed9459a37dc004a2b1d593d2835cb7.tar.gz
podman-e2b82e6245ed9459a37dc004a2b1d593d2835cb7.tar.bz2
podman-e2b82e6245ed9459a37dc004a2b1d593d2835cb7.zip
Merge pull request #8264 from joelsmith/master
Show error on bad name filter in podman ps
Diffstat (limited to 'libpod')
-rw-r--r--libpod/filters/containers.go2
-rw-r--r--libpod/filters/pods.go2
2 files changed, 4 insertions, 0 deletions
diff --git a/libpod/filters/containers.go b/libpod/filters/containers.go
index e38e024d2..da1b5b263 100644
--- a/libpod/filters/containers.go
+++ b/libpod/filters/containers.go
@@ -11,6 +11,7 @@ import (
"github.com/containers/podman/v2/pkg/timetype"
"github.com/containers/podman/v2/pkg/util"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
)
// GenerateContainerFilterFuncs return ContainerFilter functions based of filter.
@@ -40,6 +41,7 @@ func GenerateContainerFilterFuncs(filter, filterValue string, r *libpod.Runtime)
return func(c *libpod.Container) bool {
match, err := regexp.MatchString(filterValue, c.Name())
if err != nil {
+ logrus.Errorf("Failed to compile regex for 'name' filter: %v", err)
return false
}
return match
diff --git a/libpod/filters/pods.go b/libpod/filters/pods.go
index 0caa941dd..7d12eefa6 100644
--- a/libpod/filters/pods.go
+++ b/libpod/filters/pods.go
@@ -9,6 +9,7 @@ import (
"github.com/containers/podman/v2/libpod/define"
"github.com/containers/podman/v2/pkg/util"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
)
// GeneratePodFilterFunc takes a filter and filtervalue (key, value)
@@ -81,6 +82,7 @@ func GeneratePodFilterFunc(filter, filterValue string) (
return func(p *libpod.Pod) bool {
match, err := regexp.MatchString(filterValue, p.Name())
if err != nil {
+ logrus.Errorf("Failed to compile regex for 'name' filter: %v", err)
return false
}
return match