From c8e296c83e20aeafee920540599c84aead4a4c5d Mon Sep 17 00:00:00 2001
From: Matthew Heon <matthew.heon@gmail.com>
Date: Wed, 7 Feb 2018 16:26:03 -0500
Subject: Allow removing pods with running containers if --force is given

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #268
Approved by: rhatdan
---
 libpod/runtime_pod.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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())
 		}
 
-- 
cgit v1.2.3-54-g00ecf