lib/rye/box.rb in rye-0.6.4 vs lib/rye/box.rb in rye-0.6.5
- old
+ new
@@ -595,10 +595,10 @@
def net_ssh_exec!(command)
block ||= Proc.new do |channel, type, data|
channel[:stdout] ||= ""
channel[:stderr] ||= ""
- channel[:exit_code] ||= -1
+ channel[:exit_code] ||= 0
channel[:stdout] << data if type == :stdout
channel[:stderr] << data if type == :stderr
channel.on_request("exit-status") do |ch, data|
# Anything greater than 0 is an error
channel[:exit_code] = data.read_long