summaryrefslogtreecommitdiff
path: root/libpod/runtime_pod.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-02-07 16:26:03 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-09 15:01:34 +0000
commitc8e296c83e20aeafee920540599c84aead4a4c5d (patch)
treea2715c47c985138e6d6286d7f695f3b146004800 /libpod/runtime_pod.go
parent9e6855f3480f3710ac0e039754890c5d980a817d (diff)
downloadpodman-c8e296c83e20aeafee920540599c84aead4a4c5d.tar.gz
podman-c8e296c83e20aeafee920540599c84aead4a4c5d.tar.bz2
podman-c8e296c83e20aeafee920540599c84aead4a4c5d.zip
Allow removing pods with running containers if --force is given
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
Diffstat (limited to 'libpod/runtime_pod.go')
-rw-r--r--libpod/runtime_pod.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go
index 44ef453a2..248cadf09 100644
--- a/libpod/runtime_pod.go
+++ b/libpod/runtime_pod.go
@@ -97,7 +97,7 @@ func (r *Runtime) RemovePod(p *Pod, removeCtrs, force bool) error {
}
// If the container is running and force is not set we can't do anything
- if ctr.state.State == ContainerStateRunning {
+ if ctr.state.State == ContainerStateRunning && !force {
return errors.Wrapf(ErrCtrStateInvalid, "pod %s contains container %s which is running", p.ID(), ctr.ID())
}