diff options
author | baude <bbaude@redhat.com> | 2018-02-21 09:43:28 -0600 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-21 16:49:00 +0000 |
commit | f1f0f37dc142dc1687df1750c0d8c8fe1f79111a (patch) | |
tree | e8da153bed6597a4baa72cddc0a0980c0adbcc0a /cmd/podman | |
parent | 6ce70a33c5825c0f4d2afae7643db95e8b7d46f1 (diff) | |
download | podman-f1f0f37dc142dc1687df1750c0d8c8fe1f79111a.tar.gz podman-f1f0f37dc142dc1687df1750c0d8c8fe1f79111a.tar.bz2 podman-f1f0f37dc142dc1687df1750c0d8c8fe1f79111a.zip |
Correct exit code 126 and 127
The exit codes for 126 and 127 were reversed. For the record, the exit
codes used are as follows:
* 125 if ‘chroot’ itself fails
* 126 if COMMAND is found but cannot be invoked
* 127 if COMMAND cannot be found
This resolves issue #367
Signed-off-by: baude <bbaude@redhat.com>
Closes: #378
Approved by: baude
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/run.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go index 2f3468fd2..169fe6645 100644 --- a/cmd/podman/run.go +++ b/cmd/podman/run.go @@ -80,9 +80,9 @@ func runCmd(c *cli.Context) error { logrus.Debug("new container created ", ctr.ID()) if err := ctr.Init(); err != nil { // This means the command did not exist - exitCode = 126 + exitCode = 127 if strings.Index(err.Error(), "permission denied") > -1 { - exitCode = 127 + exitCode = 126 } return err } |