diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-02-28 13:18:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-28 13:18:05 -0800 |
commit | a680144f717bd86d27cd53bbd36c8e847b8bdb00 (patch) | |
tree | 72d0207661126c4b4b885862f1dad78fa4415c21 /cmd | |
parent | af848ae377f25faf59a9c1bfefb9f7011eb0fe0c (diff) | |
parent | d780e69559d8aa117e154a234d10f2112c32c8be (diff) | |
download | podman-a680144f717bd86d27cd53bbd36c8e847b8bdb00.tar.gz podman-a680144f717bd86d27cd53bbd36c8e847b8bdb00.tar.bz2 podman-a680144f717bd86d27cd53bbd36c8e847b8bdb00.zip |
Merge pull request #2487 from haircommander/exec_attahc
Allow Exec API user to override streams
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/exec.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/podman/exec.go b/cmd/podman/exec.go index 032262497..4917fb606 100644 --- a/cmd/podman/exec.go +++ b/cmd/podman/exec.go @@ -105,5 +105,13 @@ func execCmd(c *cliconfig.ExecValues) error { envs = append(envs, fmt.Sprintf("%s=%s", k, v)) } - return ctr.Exec(c.Tty, c.Privileged, envs, cmd, c.User, c.Workdir) + streams := new(libpod.AttachStreams) + streams.OutputStream = os.Stdout + streams.ErrorStream = os.Stderr + streams.InputStream = os.Stdin + streams.AttachOutput = true + streams.AttachError = true + streams.AttachInput = true + + return ctr.Exec(c.Tty, c.Privileged, envs, cmd, c.User, c.Workdir, streams) } |