diff options
Diffstat (limited to 'cmd/podman/exec.go')
-rw-r--r-- | cmd/podman/exec.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cmd/podman/exec.go b/cmd/podman/exec.go index 7040a7b09..4917fb606 100644 --- a/cmd/podman/exec.go +++ b/cmd/podman/exec.go @@ -21,7 +21,7 @@ var ( Run a command in a running container ` _execCommand = &cobra.Command{ - Use: "exec", + Use: "exec [flags] CONTAINER [COMMAND [ARG...]]", Short: "Run a process in a running container", Long: execDescription, RunE: func(cmd *cobra.Command, args []string) error { @@ -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) } |