diff options
author | Debarshi Ray <rishi@fedoraproject.org> | 2019-01-08 12:53:50 +0100 |
---|---|---|
committer | Debarshi Ray <rishi@fedoraproject.org> | 2019-01-08 17:42:37 +0100 |
commit | 867669374c3fdd39f2629e53cbe7430f1bc3e085 (patch) | |
tree | ff744348a1f94cac55771eeb6e36d7ae47579ec7 /libpod/container_api.go | |
parent | 9474b8cea239348d11c913b03b9461afaf663f0b (diff) | |
download | podman-867669374c3fdd39f2629e53cbe7430f1bc3e085.tar.gz podman-867669374c3fdd39f2629e53cbe7430f1bc3e085.tar.bz2 podman-867669374c3fdd39f2629e53cbe7430f1bc3e085.zip |
Add a --workdir option to 'podman exec'
Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r-- | libpod/container_api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index 09bc46905..4eaf737b0 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -262,7 +262,7 @@ func (c *Container) Kill(signal uint) error { // Exec starts a new process inside the container // TODO allow specifying streams to attach to // TODO investigate allowing exec without attaching -func (c *Container) Exec(tty, privileged bool, env, cmd []string, user string) error { +func (c *Container) Exec(tty, privileged bool, env, cmd []string, user, workDir string) error { var capList []string locked := false @@ -324,7 +324,7 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user string) e logrus.Debugf("Creating new exec session in container %s with session id %s", c.ID(), sessionID) - execCmd, err := c.runtime.ociRuntime.execContainer(c, cmd, capList, env, tty, hostUser, sessionID) + execCmd, err := c.runtime.ociRuntime.execContainer(c, cmd, capList, env, tty, workDir, hostUser, sessionID) if err != nil { return errors.Wrapf(err, "error exec %s", c.ID()) } |