mirror of
https://github.com/containers/podman.git
synced 2025-12-05 12:52:12 +08:00
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
This commit is contained in:
@@ -441,7 +441,7 @@ func getTemplateOutput(containers []*libpod.Container, opts psOptions) ([]psTemp
|
|||||||
|
|
||||||
switch batchInfo.conState {
|
switch batchInfo.conState {
|
||||||
case libpod.ContainerStateStopped:
|
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:
|
case libpod.ContainerStateRunning:
|
||||||
status = "Up " + runningFor + " ago"
|
status = "Up " + runningFor + " ago"
|
||||||
case libpod.ContainerStatePaused:
|
case libpod.ContainerStatePaused:
|
||||||
|
|||||||
Reference in New Issue
Block a user