summaryrefslogtreecommitdiff
path: root/pkg/adapter
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-25 09:45:55 +0200
committerGitHub <noreply@github.com>2019-09-25 09:45:55 +0200
commit240095e24bedbb2443926f6777bca4cb63c2ab53 (patch)
tree0ce51b19d31314b240a5a3cc30b33374cc78855a /pkg/adapter
parenta5b24816c75e97c4992c648c219df5792594a3a1 (diff)
parent61a226fbd51de015e1753df451a2c67a689caf69 (diff)
downloadpodman-240095e24bedbb2443926f6777bca4cb63c2ab53.tar.gz
podman-240095e24bedbb2443926f6777bca4cb63c2ab53.tar.bz2
podman-240095e24bedbb2443926f6777bca4cb63c2ab53.zip
Merge pull request #4102 from baude/remotestdin
conditionally send stdin on remote run
Diffstat (limited to 'pkg/adapter')
-rw-r--r--pkg/adapter/containers_remote.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/adapter/containers_remote.go b/pkg/adapter/containers_remote.go
index 01e008e87..6cecb92da 100644
--- a/pkg/adapter/containers_remote.go
+++ b/pkg/adapter/containers_remote.go
@@ -473,7 +473,12 @@ func (r *LocalRuntime) Run(ctx context.Context, c *cliconfig.RunValues, exitCode
fmt.Println(cid)
return 0, nil
}
- exitChan, errChan, err := r.attach(ctx, os.Stdin, os.Stdout, cid, true, c.String("detach-keys"))
+ inputStream := os.Stdin
+ // If -i is not set, clear stdin
+ if !c.Bool("interactive") {
+ inputStream = nil
+ }
+ exitChan, errChan, err := r.attach(ctx, inputStream, os.Stdout, cid, true, c.String("detach-keys"))
if err != nil {
return exitCode, err
}