diff options
author | Peter Hunt <pehunt@redhat.com> | 2019-07-22 15:12:29 -0400 |
---|---|---|
committer | Peter Hunt <pehunt@redhat.com> | 2019-07-23 13:29:33 -0400 |
commit | 479eeac62cd74e32cbe74fc8afbfc82d4d8a8abd (patch) | |
tree | a343b6279109433381eee0b5e885610823f252de /cmd | |
parent | 35ba77e0409036c455f85d9f8fcbe361f0693335 (diff) | |
download | podman-479eeac62cd74e32cbe74fc8afbfc82d4d8a8abd.tar.gz podman-479eeac62cd74e32cbe74fc8afbfc82d4d8a8abd.tar.bz2 podman-479eeac62cd74e32cbe74fc8afbfc82d4d8a8abd.zip |
move editing of exitCode to runtime
There's no way to get the error if we successfully get an exit code (as it's just printed to stderr instead).
instead of relying on the error to be passed to podman, and edit based on the error code, process it on the varlink side instead
Also move error codes to define package
Signed-off-by: Peter Hunt <pehunt@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/exec.go | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/cmd/podman/exec.go b/cmd/podman/exec.go index 2e9b9e47e..649a7b0db 100644 --- a/cmd/podman/exec.go +++ b/cmd/podman/exec.go @@ -2,7 +2,6 @@ package main import ( "github.com/containers/libpod/cmd/podman/cliconfig" - "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/adapter" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -70,11 +69,5 @@ func execCmd(c *cliconfig.ExecValues) error { defer runtime.DeferredShutdown(false) exitCode, err = runtime.ExecContainer(getContext(), c) - if errors.Cause(err) == define.ErrOCIRuntimePermissionDenied { - exitCode = 126 - } - if errors.Cause(err) == define.ErrOCIRuntimeNotFound { - exitCode = 127 - } return err } |