Skip to content

Commit

Permalink
M #-: Fix stdin processing in SshStreamCommand (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
xorel authored and rsmontero committed Apr 14, 2021
1 parent c4443ab commit cfccdf4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mad/ruby/ssh_stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,11 @@ def run(command, stdin=nil, base_cmd = nil, timeout = nil)
end

@stream.exec(command)
@stream.stdin.write(stdin) if stdin

if stdin
@stream.stdin.write(stdin)
@stream.stdin.close
end

@code = @stream.wait_for_command(@timeout)

Expand Down

0 comments on commit cfccdf4

Please sign in to comment.