bin/tl in testlab-0.6.8 vs bin/tl in testlab-0.6.9

- old
+ new

@@ -40,12 +40,16 @@ desc 'Show verbose output' default_value false switch [:v, :verbose] +desc 'Quiet mode' +default_value false +switch [:q, :quiet] + pre do |global,command,options,args| - global[:v].nil? or (global[:v] == true) and ENV['LOG_LEVEL'] = 'DEBUG' + (global[:v] == true) and ENV['LOG_LEVEL'] = 'DEBUG' log_file = File.join(Dir.pwd, "testlab-#{HOSTNAME}.log") @logger = ZTK::Logger.new(log_file) @logger.debug { "global(#{global.inspect})" } @@ -55,11 +59,13 @@ @ui = ZTK::UI.new(:logger => @logger) @testlab = TestLab.new(:ui => @ui) TestLab::Utility.log_header(@testlab).each { |line| @logger.info { line } } - message = format_message("TestLab v#{TestLab::VERSION} Loaded".black.bold) - @testlab.ui.stdout.puts(message) + if (global[:q] == false) + message = format_message("TestLab v#{TestLab::VERSION} Loaded".black.bold) + @testlab.ui.stdout.puts(message) + end true end post do |global,command,options,args|