summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-02-26 16:26:04 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-26 23:18:36 +0000
commitf47a5be60d91fd2055ed6afbb6bb014c9635f2df (patch)
treecb58ae7f16f88590119c71a513e96a24280ec844 /cmd
parente5ddf34e648c6bf431e062c90b067f5eb8a3beb0 (diff)
downloadpodman-f47a5be60d91fd2055ed6afbb6bb014c9635f2df.tar.gz
podman-f47a5be60d91fd2055ed6afbb6bb014c9635f2df.tar.bz2
podman-f47a5be60d91fd2055ed6afbb6bb014c9635f2df.zip
ps displays incorrect exit code
The exit code should be derived in the batch operation and pulled from the batchinfo struct. Resolves issue #407 Signed-off-by: baude <bbaude@redhat.com> Closes: #408 Approved by: rhatdan
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/ps.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go
index b635ea392..14da06ae8 100644
--- a/cmd/podman/ps.go
+++ b/cmd/podman/ps.go
@@ -441,7 +441,7 @@ func getTemplateOutput(containers []*libpod.Container, opts psOptions) ([]psTemp
switch batchInfo.conState {
case libpod.ContainerStateStopped:
- status = fmt.Sprintf("Exited (%d) %s ago", exitCode, runningFor)
+ status = fmt.Sprintf("Exited (%d) %s ago", batchInfo.exitCode, runningFor)
case libpod.ContainerStateRunning:
status = "Up " + runningFor + " ago"
case libpod.ContainerStatePaused: