From d0247e01c08cf2ce0fefb5808f11c824b681d61f Mon Sep 17 00:00:00 2001 From: varac Date: Fri, 1 Feb 2013 15:07:50 +0100 Subject: ignore variable scope warnings for now in leap_cli (Feature #1621) --- lib/leap_cli/logger.rb | 1 + vendor/supply_drop/lib/supply_drop/writer/colorful_streaming.rb | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/leap_cli/logger.rb b/lib/leap_cli/logger.rb index 181a4ae..3776be0 100644 --- a/lib/leap_cli/logger.rb +++ b/lib/leap_cli/logger.rb @@ -108,6 +108,7 @@ module LeapCli # PUPPET { :match => /^warning: .*is deprecated.*$/, :level => 2, :color => :yellow, :priority => -10}, + { :match => /^warning: Scope.*$/, :level => 2, :color => :yellow, :priority => -10}, { :match => /^notice:/, :level => 1, :color => :cyan, :priority => -20}, { :match => /^err:/, :level => 0, :color => :red, :priority => -20}, { :match => /^warning:/, :level => 0, :color => :yellow, :priority => -20}, diff --git a/vendor/supply_drop/lib/supply_drop/writer/colorful_streaming.rb b/vendor/supply_drop/lib/supply_drop/writer/colorful_streaming.rb index 6abe90d..e88e552 100644 --- a/vendor/supply_drop/lib/supply_drop/writer/colorful_streaming.rb +++ b/vendor/supply_drop/lib/supply_drop/writer/colorful_streaming.rb @@ -20,6 +20,11 @@ module SupplyDrop @mode = 'notice' end + # make variable scope warnings like notices + if data =~ /^warning: Scope*$/ + @mode = 'notice' + end + # force the printing of 'finished catalog run' if there have not been any errors if @mode == 'notice' && !@error_encountered && data =~ /Finished catalog run/ @mode = 'forced_notice' -- cgit v1.2.3