mirror of https://github.com/containers/podman.git
Allow removing pods with running containers if --force is given
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
This commit is contained in:
parent
9e6855f348
commit
c8e296c83e
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue