diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-09-12 08:51:53 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-09-13 14:04:01 -0400 |
commit | ba2130ff55d1410407d56c65d5592ee40d20fae2 (patch) | |
tree | 9be9c9f4001f683a10c4a91d331ba3cadf64cdb8 /cmd/podman/system/reset.go | |
parent | cc9491447479844ffdd27ba1c310d7e0a5a59a79 (diff) | |
download | podman-ba2130ff55d1410407d56c65d5592ee40d20fae2.tar.gz podman-ba2130ff55d1410407d56c65d5592ee40d20fae2.tar.bz2 podman-ba2130ff55d1410407d56c65d5592ee40d20fae2.zip |
If container exits with 125 podman should exit with 125
fixes: https://github.com/containers/podman/issues/11540
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/system/reset.go')
-rw-r--r-- | cmd/podman/system/reset.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/podman/system/reset.go b/cmd/podman/system/reset.go index c64d09ed2..8a05bb09f 100644 --- a/cmd/podman/system/reset.go +++ b/cmd/podman/system/reset.go @@ -11,6 +11,7 @@ import ( "github.com/containers/common/pkg/completion" "github.com/containers/podman/v3/cmd/podman/registry" "github.com/containers/podman/v3/cmd/podman/validate" + "github.com/containers/podman/v3/libpod/define" "github.com/containers/podman/v3/pkg/domain/entities" "github.com/containers/podman/v3/pkg/domain/infra" "github.com/sirupsen/logrus" @@ -87,13 +88,13 @@ WARNING! This will remove: engine, err := infra.NewSystemEngine(entities.ResetMode, registry.PodmanConfig()) if err != nil { logrus.Error(err) - os.Exit(125) + os.Exit(define.ExecErrorCodeGeneric) } defer engine.Shutdown(registry.Context()) if err := engine.Reset(registry.Context()); err != nil { logrus.Error(err) - os.Exit(125) + os.Exit(define.ExecErrorCodeGeneric) } os.Exit(0) } |