Add an environment option to suppress info msgs
It's often you want counts of just WARN and ERROR messages, and don't want to spam yourself with INFO messages that you don't intend to address anyway. This is most often the case with CI, such as with https://travis-ci.org/todb-r7/metasploit-frameworkbug/bundler_fix
parent
765419627b
commit
d9fbf861d2
|
@ -11,6 +11,7 @@ require 'find'
|
|||
require 'time'
|
||||
|
||||
CHECK_OLD_RUBIES = !!ENV['MSF_CHECK_OLD_RUBIES']
|
||||
SUPRESS_INFO_MESSAGES = !!ENV['MSF_SUPPRESS_INFO_MESSAGES']
|
||||
|
||||
if CHECK_OLD_RUBIES
|
||||
require 'rvm'
|
||||
|
@ -91,6 +92,7 @@ class Msftidy
|
|||
# Display an info message. Info messages do not alter the exit status.
|
||||
#
|
||||
def info(txt, line=0)
|
||||
return if SUPRESS_INFO_MESSAGES
|
||||
line_msg = (line>0) ? ":#{line}" : ''
|
||||
puts "#{@full_filepath}#{line_msg} - [#{'INFO'.cyan}] #{cleanup_text(txt)}"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue