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 /libpod/define/exec_codes.go | |
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 'libpod/define/exec_codes.go')
-rw-r--r-- | libpod/define/exec_codes.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libpod/define/exec_codes.go b/libpod/define/exec_codes.go new file mode 100644 index 000000000..90a68cf93 --- /dev/null +++ b/libpod/define/exec_codes.go @@ -0,0 +1,13 @@ +package define + +const ( + // ExecErrorCodeGeneric is the default error code to return from an exec session if libpod failed + // prior to calling the runtime + ExecErrorCodeGeneric = 125 + // ExecErrorCodeCannotInvoke is the error code to return when the runtime fails to invoke a command + // an example of this can be found by trying to execute a directory: + // `podman exec -l /etc` + ExecErrorCodeCannotInvoke = 126 + // ExecErrorCodeNotFound is the error code to return when a command cannot be found + ExecErrorCodeNotFound = 127 +) |