Skip to content

Commit

Permalink
Merge pull request containers#4271 from tylarb/stdin_attach
Browse files Browse the repository at this point in the history
Attach to container if it was created with --interactive
  • Loading branch information
openshift-merge-robot authored Oct 17, 2019
2 parents d7cbcfa + 14e905e commit f2d9a9d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/adapter/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f2d9a9d

Please sign in to comment.