lib/autobuild/reporting.rb in autobuild-1.6.2.b4 vs lib/autobuild/reporting.rb in autobuild-1.6.2.b5

- old
+ new

@@ -11,10 +11,11 @@ require 'etc' require 'find' require 'autobuild/config' require 'autobuild/exceptions' +require 'thread' module Autobuild class << self attr_reader :display_lock end @@ -107,17 +108,19 @@ found end def self.display_progress msg = "#{progress_messages.map(&:last).join(" | ")}" - if @last_progress_msg && @last_progress_msg.length > msg.length + if @last_progress_msg print "\r" + " " * @last_progress_msg.length end - print "\r #{msg}\r" - @last_progress_msg = - if msg.empty? then nil - else msg - end + + if msg.empty? + @last_progress_msg = nil + else + print "\r #{msg}" + @last_progress_msg = msg + end end # The exception type that is used to report multiple errors that occured # when ignore_errors is set class CompositeException < Autobuild::Exception