summaryrefslogtreecommitdiff
path: root/libpod/container_api.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-12 15:27:16 +0200
committerGitHub <noreply@github.com>2019-06-12 15:27:16 +0200
commit9faff314218a4d8074a40349a262535a84c4fbab (patch)
treebc04179f6e3db8d097106eaceda199ee33fb6e1e /libpod/container_api.go
parentd4681fafe55340043fa421ae31b98681dd6902c4 (diff)
parent3bbb692d807277da991a96b336bf88a84b35964d (diff)
downloadpodman-9faff314218a4d8074a40349a262535a84c4fbab.tar.gz
podman-9faff314218a4d8074a40349a262535a84c4fbab.tar.bz2
podman-9faff314218a4d8074a40349a262535a84c4fbab.zip
Merge pull request #3307 from rhatdan/126
If container is not in correct state podman exec should exit with 126
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r--libpod/container_api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index 1894780de..52d3afc0a 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -241,7 +241,7 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user, workDir
// TODO can probably relax this once we track exec sessions
if conState != ContainerStateRunning {
- return errors.Errorf("cannot exec into container that is not running")
+ return errors.Wrapf(ErrCtrStateInvalid, "cannot exec into container that is not running")
}
if privileged || c.config.Privileged {
capList = caps.GetAllCapabilities()