diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-12-02 19:24:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-02 19:24:54 +0100 |
commit | 711728672f93d20d4aaf084e49db5e282fece952 (patch) | |
tree | 108eefaf906689ee222814031ca8c64457feaf2f | |
parent | 8d00c838fb3da8ab4e0f8fdd79dd8aac263c6b59 (diff) | |
parent | e13e5502e3f6c5f2e991ec577fea25a4c77b6b81 (diff) | |
download | podman-711728672f93d20d4aaf084e49db5e282fece952.tar.gz podman-711728672f93d20d4aaf084e49db5e282fece952.tar.bz2 podman-711728672f93d20d4aaf084e49db5e282fece952.zip |
Merge pull request #4617 from giuseppe/fix-error-case
libpod: fix case for executable file not found errors
-rw-r--r-- | libpod/oci_util.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libpod/oci_util.go b/libpod/oci_util.go index 3345220ac..53567d2d0 100644 --- a/libpod/oci_util.go +++ b/libpod/oci_util.go @@ -82,18 +82,16 @@ func bindPorts(ports []ocicni.PortMapping) ([]*os.File, error) { } func getOCIRuntimeError(runtimeMsg string) error { - r := strings.ToLower(runtimeMsg) - includeFullOutput := logrus.GetLevel() == logrus.DebugLevel - if match := regexp.MustCompile(".*permission denied.*|.*operation not permitted.*").FindString(r); match != "" { + if match := regexp.MustCompile("(?i).*permission denied.*|.*operation not permitted.*").FindString(runtimeMsg); match != "" { errStr := match if includeFullOutput { errStr = runtimeMsg } return errors.Wrapf(define.ErrOCIRuntimePermissionDenied, "%s", strings.Trim(errStr, "\n")) } - if match := regexp.MustCompile(".*executable file not found in.*|.*no such file or directory.*").FindString(r); match != "" { + if match := regexp.MustCompile("(?i).*executable file not found in.*|.*no such file or directory.*").FindString(runtimeMsg); match != "" { errStr := match if includeFullOutput { errStr = runtimeMsg |