diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2019-09-07 05:40:45 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2019-09-12 16:20:01 -0400 |
commit | 535111b5d5cfa0d203df77e6d6b0b69eda46bb82 (patch) | |
tree | a22a31672391f8d2235fccaa891162a6f9467e7e /cmd/podman/containers_prune.go | |
parent | af8fedcc78674d71d43ca3000438c42b7b6b6994 (diff) | |
download | podman-535111b5d5cfa0d203df77e6d6b0b69eda46bb82.tar.gz podman-535111b5d5cfa0d203df77e6d6b0b69eda46bb82.tar.bz2 podman-535111b5d5cfa0d203df77e6d6b0b69eda46bb82.zip |
Use exit code constants
We have leaked the exit number codess all over the code, this patch
removes the numbers to constants.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/containers_prune.go')
-rw-r--r-- | cmd/podman/containers_prune.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/containers_prune.go b/cmd/podman/containers_prune.go index b8a84a0e3..3d0fef37d 100644 --- a/cmd/podman/containers_prune.go +++ b/cmd/podman/containers_prune.go @@ -53,7 +53,7 @@ func pruneContainersCmd(c *cliconfig.PruneContainersValues) error { if err != nil { if errors.Cause(err) == define.ErrNoSuchCtr { if len(c.InputArgs) > 1 { - exitCode = 125 + exitCode = define.ExecErrorCodeGeneric } else { exitCode = 1 } @@ -61,7 +61,7 @@ func pruneContainersCmd(c *cliconfig.PruneContainersValues) error { return err } if len(failures) > 0 { - exitCode = 125 + exitCode = define.ExecErrorCodeGeneric } return printCmdResults(ok, failures) } |