mirror of
https://github.com/containers/podman.git
synced 2026-03-18 22:57:36 -04:00
Correctly report errors retrieving containers in ps
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #944 Approved by: rhatdan
This commit is contained in:
@@ -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])
|
||||
|
||||
@@ -620,7 +620,7 @@ func (s *BoltState) AllContainers() ([]*Container, error) {
|
||||
return err
|
||||
}
|
||||
|
||||
err = allCtrsBucket.ForEach(func(id, name []byte) error {
|
||||
return allCtrsBucket.ForEach(func(id, name []byte) error {
|
||||
// If performance becomes an issue, this check can be
|
||||
// removed. But the error messages that come back will
|
||||
// be much less helpful.
|
||||
@@ -637,7 +637,6 @@ func (s *BoltState) AllContainers() ([]*Container, error) {
|
||||
|
||||
return s.getContainerFromDB(id, ctr, ctrBucket)
|
||||
})
|
||||
return err
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user