diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/cp.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/podman/cp.go b/cmd/podman/cp.go index 406337955..907bde4b9 100644 --- a/cmd/podman/cp.go +++ b/cmd/podman/cp.go @@ -98,7 +98,13 @@ func copyBetweenHostAndContainer(runtime *libpod.Runtime, src string, dest strin // We can't pause rootless containers. if pause && rootless.IsRootless() { - logrus.Warnf("Cannot pause rootless containers - pause option will be ignored") + state, err := ctr.State() + if err != nil { + return err + } + if state == libpod.ContainerStateRunning { + return errors.Errorf("cannot copy into running rootless container with pause set - pass --pause=false to force copying") + } } if pause && !rootless.IsRootless() { |