Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Respect quiet option in config file

  • Loading branch information...
commit d6d9dc22279b129629f279c8724e25d2d98de10f 1 parent 5e2f4ce
@presidentbeef authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/brakeman.rb
View
9 lib/brakeman.rb
@@ -65,7 +65,12 @@ def self.set_options options
options[:app_path] = File.expand_path(options[:app_path])
- options = load_options(options[:config_file]).merge! options
+ file_options = load_options(options[:config_file])
+
+ options = file_options.merge options
+
+ options[:quiet] = true if options[:quiet].nil? && file_options[:quiet]
+
options = get_defaults.merge! options
options[:output_formats] = get_output_formats options
@@ -89,9 +94,9 @@ def self.set_options options
def self.load_options custom_location
#Load configuration file
if config = config_file(custom_location)
- notify "[Notice] Using configuration in #{config}"
options = YAML.load_file config
options.each { |k, v| options[k] = Set.new v if v.is_a? Array }
+ notify "[Notice] Using configuration in #{config}" unless options[:quiet]
options
else
{}
Please sign in to comment.
Something went wrong with that request. Please try again.