lib/knife-solo/ssh_connection.rb in knife-solo-0.5.1 vs lib/knife-solo/ssh_connection.rb in knife-solo-0.6.0
- old
+ new
@@ -51,10 +51,10 @@
def run_command(command, output = nil)
result = ExecResult.new
session.open_channel do |channel|
channel.request_pty
- channel.exec(command) do |ch, success|
+ channel.exec(command) do |_, success|
raise "ssh.channel.exec failure" unless success
channel.on_data do |ch, data| # stdout
if data =~ /^knife sudo password: /
ch.send_data("#{password}\n")