summaryrefslogtreecommitdiff
path: root/libpod/define/exec_codes.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-09-17 09:04:22 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2019-09-17 12:01:02 -0400
commit34d22a4e5ca3761763c1c3b3dd511588d617536e (patch)
treeda090baaf6edc219849fa7bf846efa1b13117fcc /libpod/define/exec_codes.go
parent799aa7022bcf4b8b76276f86ea633c960351fb93 (diff)
downloadpodman-34d22a4e5ca3761763c1c3b3dd511588d617536e.tar.gz
podman-34d22a4e5ca3761763c1c3b3dd511588d617536e.tar.bz2
podman-34d22a4e5ca3761763c1c3b3dd511588d617536e.zip
Fix exit code failure
Be less precise on the exit code and lot the exit code to the journal when it fails. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/define/exec_codes.go')
-rw-r--r--libpod/define/exec_codes.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/libpod/define/exec_codes.go b/libpod/define/exec_codes.go
index 33d631326..f94616b33 100644
--- a/libpod/define/exec_codes.go
+++ b/libpod/define/exec_codes.go
@@ -4,6 +4,7 @@ import (
"strings"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
)
const (
@@ -39,8 +40,9 @@ func ExitCode(err error) int {
return 0
}
e := strings.ToLower(err.Error())
- if strings.Contains(e, "file not found") ||
- strings.Contains(e, "no such file or directory") {
+ logrus.Debugf("ExitCode msg: %q", e)
+ if strings.Contains(e, "not found") ||
+ strings.Contains(e, "no such file") {
return ExecErrorCodeNotFound
}