From cdb447bba2b00dfd8f473a38b75115d1cd6ee799 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 14 Jun 2018 12:41:38 -0400 Subject: Correctly report errors retrieving containers in ps Signed-off-by: Matthew Heon Closes: #944 Approved by: rhatdan --- cmd/podman/ps.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd') diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go index ca20f3f33..aa544e6d1 100644 --- a/cmd/podman/ps.go +++ b/cmd/podman/ps.go @@ -200,6 +200,12 @@ func psCmd(c *cli.Context) error { } containers, err := runtime.GetContainers(filterFuncs...) + if err != nil { + return err + } + + // TODO: Latest and Last are broken right now due to lack of container + // ordering var outputContainers []*libpod.Container if opts.Latest && len(containers) > 0 { outputContainers = append(outputContainers, containers[0]) -- cgit v1.2.3-54-g00ecf