conditionally send stdin on remote run

when running a container remotely, we should only be sending stdin when
running with --interactive; otherwise use nil.

Fixes: #4095

Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
baude
2019-09-24 13:43:44 -05:00
parent 83b2348313
commit 61a226fbd5
2 changed files with 9 additions and 2 deletions

View File

@ -65,7 +65,9 @@ func (i *LibpodAPI) Attach(call iopodman.VarlinkCall, name string, detachKeys st
}
// ACK the client upgrade request
call.ReplyAttach()
if err := call.ReplyAttach(); err != nil {
return call.ReplyErrorOccurred(err.Error())
}
reader, writer, _, pw, streams := setupStreams(call)