diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-12-06 08:11:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 08:11:51 -0800 |
commit | 99bbbeb746820716610317fedd8d3918951a9d7d (patch) | |
tree | 3dd47005274a71a81bea1fad5d1507a24e4a2f60 /cmd/podman/shared | |
parent | 5a07644646f0a42c04d496930c3e3ba4696301f2 (diff) | |
parent | e5335fd74c7ed6fe0fa55bf33afbdab23ed687f1 (diff) | |
download | podman-99bbbeb746820716610317fedd8d3918951a9d7d.tar.gz podman-99bbbeb746820716610317fedd8d3918951a9d7d.tar.bz2 podman-99bbbeb746820716610317fedd8d3918951a9d7d.zip |
Merge pull request #1887 from mheon/rm_sync
Add --sync option to podman rm
Diffstat (limited to 'cmd/podman/shared')
-rw-r--r-- | cmd/podman/shared/container.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/shared/container.go b/cmd/podman/shared/container.go index d0e892961..90ce193f7 100644 --- a/cmd/podman/shared/container.go +++ b/cmd/podman/shared/container.go @@ -45,6 +45,7 @@ type PsOptions struct { Sort string Label string Namespace bool + Sync bool } // BatchContainerStruct is the return obkect from BatchContainer and contains @@ -126,6 +127,12 @@ func NewBatchContainer(ctr *libpod.Container, opts PsOptions) (PsContainerOutput pso PsContainerOutput ) batchErr := ctr.Batch(func(c *libpod.Container) error { + if opts.Sync { + if err := c.Sync(); err != nil { + return err + } + } + conState, err = c.State() if err != nil { return errors.Wrapf(err, "unable to obtain container state") |