diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-10-17 17:38:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-17 17:38:18 +0200 |
commit | f2d9a9d2abd1405d8ea5fb7b94715f6f87618226 (patch) | |
tree | 4476a6b55440fb2c71892b869f206ff5af2ecf66 | |
parent | d7cbcfadd07e9c79831e51de294b307b00292d49 (diff) | |
parent | 14e905e1eb27918322b7b62e0ca38045456d384c (diff) | |
download | podman-f2d9a9d2abd1405d8ea5fb7b94715f6f87618226.tar.gz podman-f2d9a9d2abd1405d8ea5fb7b94715f6f87618226.tar.bz2 podman-f2d9a9d2abd1405d8ea5fb7b94715f6f87618226.zip |
Merge pull request #4271 from tylarb/stdin_attach
Attach to container if it was created with --interactive
-rw-r--r-- | pkg/adapter/containers.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go index 12fd98486..5c33467a7 100644 --- a/pkg/adapter/containers.go +++ b/pkg/adapter/containers.go @@ -612,7 +612,9 @@ func (r *LocalRuntime) Start(ctx context.Context, c *cliconfig.StartValues, sigP if c.Attach { inputStream := os.Stdin if !c.Interactive { - inputStream = nil + if !ctr.Stdin() { + inputStream = nil + } } // attach to the container and also start it not already running |