summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-28 13:18:05 -0800
committerGitHub <noreply@github.com>2019-02-28 13:18:05 -0800
commita680144f717bd86d27cd53bbd36c8e847b8bdb00 (patch)
tree72d0207661126c4b4b885862f1dad78fa4415c21 /cmd/podman
parentaf848ae377f25faf59a9c1bfefb9f7011eb0fe0c (diff)
parentd780e69559d8aa117e154a234d10f2112c32c8be (diff)
downloadpodman-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/podman')
-rw-r--r--cmd/podman/exec.go10
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)
}