summaryrefslogtreecommitdiff
path: root/cmd/podman/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/main.go')
-rw-r--r--cmd/podman/main.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index b27409e4c..0fd30fa71 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -13,7 +13,10 @@ import (
// This is populated by the Makefile from the VERSION file
// in the repository
-var podmanVersion = ""
+var (
+ podmanVersion = ""
+ exitCode = 125
+)
func main() {
debug := false
@@ -152,5 +155,14 @@ func main() {
} else {
fmt.Fprintln(os.Stderr, err.Error())
}
+ } else {
+ // The exitCode modified from 125, indicates an application
+ // running inside of a container failed, as opposed to the
+ // podman command failed. Must exit with that exit code
+ // otherwise command exited correctly.
+ if exitCode == 125 {
+ exitCode = 0
+ }
}
+ os.Exit(exitCode)
}