lib/screwcap/runner.rb in screwcap-0.3.3 vs lib/screwcap/runner.rb in screwcap-0.3.4

- old
+ new

@@ -78,11 +78,11 @@ def self.run_command(ssh, address, server, command) if command[:type] == :remote log " I: (#{address}): #{command[:command]}\n", :color => :green stdout, stderr, exit_code, exit_signal = ssh_exec! ssh, command[:command] - log(" O: (#{address}): #{stdout}", :color => :green) unless stdout.nil? - errorlog(" O: (#{address}): #{stderr}", :color => :red) unless stderr.nil? + log(" O: (#{address}): #{stdout}", :color => :green) unless stdout.nil? or stdout == "" + errorlog(" O: (#{address}): #{stderr}", :color => :red) unless stderr.nil? or stderr == "" errorlog(" E: (#{address}): #{command[:command]} return exit code: #{exit_code}\n", :color => :red) if exit_code != 0 return exit_code elsif command[:type] == :local ret = `#{command[:command]}` if $?.to_i == 0