summaryrefslogtreecommitdiff
path: root/pkg/ps
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/ps')
-rw-r--r--pkg/ps/ps.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/ps/ps.go b/pkg/ps/ps.go
index 69ac9c215..90ad23f49 100644
--- a/pkg/ps/ps.go
+++ b/pkg/ps/ps.go
@@ -136,6 +136,12 @@ func ListContainerBatch(rt *libpod.Runtime, ctr *libpod.Container, opts entities
)
batchErr := ctr.Batch(func(c *libpod.Container) error {
+ if opts.Sync {
+ if err := c.Sync(); err != nil {
+ return errors.Wrapf(err, "unable to update container state from OCI runtime")
+ }
+ }
+
conConfig = c.Config()
conState, err = c.State()
if err != nil {