From f47a5be60d91fd2055ed6afbb6bb014c9635f2df Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 26 Feb 2018 16:26:04 -0600 Subject: 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 Closes: #408 Approved by: rhatdan --- cmd/podman/ps.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v1.2.3-54-g00ecf