From d6469c9c9b88cf206b24a99a764ebfbc82d217b7 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 28 May 2020 14:24:01 +0200 Subject: 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 --- pkg/ps/ps.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/ps/ps.go') 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 { -- cgit v1.2.3-54-g00ecf