summaryrefslogtreecommitdiff
path: root/pkg/ps/ps.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-05-28 14:24:01 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-05-28 14:24:01 +0200
commitd6469c9c9b88cf206b24a99a764ebfbc82d217b7 (patch)
treef4ad211e8eb9e5aa0d80e38f04b9064b93f58502 /pkg/ps/ps.go
parentadca437d03bc74edcf3ef9b60ea55360157f893c (diff)
downloadpodman-d6469c9c9b88cf206b24a99a764ebfbc82d217b7.tar.gz
podman-d6469c9c9b88cf206b24a99a764ebfbc82d217b7.tar.bz2
podman-d6469c9c9b88cf206b24a99a764ebfbc82d217b7.zip
fix `ps --last=N`
Fix `ps --last=N` to also include non-running containers. Also add an e2e test to prevent us from regressing in the future. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/ps/ps.go')
-rw-r--r--pkg/ps/ps.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/ps/ps.go b/pkg/ps/ps.go
index 907063df9..ec96367cb 100644
--- a/pkg/ps/ps.go
+++ b/pkg/ps/ps.go
@@ -23,7 +23,7 @@ func GetContainerLists(runtime *libpod.Runtime, options entities.ContainerListOp
filterFuncs []libpod.ContainerFilter
pss []entities.ListContainer
)
- all := options.All
+ all := options.All || options.Last > 0
if len(options.Filters) > 0 {
for k, v := range options.Filters {
for _, val := range v {