summaryrefslogtreecommitdiff
path: root/cmd/podman/exec.go
diff options
context:
space:
mode:
authorPeter Hunt <pehunt@redhat.com>2019-07-22 15:12:29 -0400
committerPeter Hunt <pehunt@redhat.com>2019-07-23 13:29:33 -0400
commit479eeac62cd74e32cbe74fc8afbfc82d4d8a8abd (patch)
treea343b6279109433381eee0b5e885610823f252de /cmd/podman/exec.go
parent35ba77e0409036c455f85d9f8fcbe361f0693335 (diff)
downloadpodman-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/podman/exec.go')
-rw-r--r--cmd/podman/exec.go7
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
}