lib/trop/shell_deb_verb.rb in trop-0.6.1 vs lib/trop/shell_deb_verb.rb in trop-0.6.19

- old
+ new

@@ -1,6 +1,5 @@ - require 'rake/file_utils_ext' require_relative 'core-ext' #def bash_cmd(cmd) @@ -30,11 +29,11 @@ ENV['VERBOSE'] = "true" return !!@@verbose end def self.silence_streams(*streams) - @@on_hold = streams.collect { |stream| stream.dup } + @@on_hold = streams.collect {|stream| stream.dup} streams.each do |stream| stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null') stream.sync = true end yield @@ -81,12 +80,12 @@ if cmds.is_a? Array cmds.each {|s| cmd = cmd + s.to_s + ' ' unless s.blank?} else cmd = cmds.to_s end - puts "commands: #{cmd} " if Trop::Sh::debug? + puts "commands: #{cmd} " if Trop::Sh::debug? return [-1, ''] if cmd.blank? - puts " #{cmd} ".colorize(:green) if Trop::Sh::verbose? + puts " #{cmd} ".colorize(:green) if Trop::Sh::verbose? # execute system call with return in stdout stdout = `#{cmd}` # silent if successful or not verbose if $CHILD_STATUS.success?