提交 49e74ac1 编写于 作者: J Justin Collins

Brakeman.run should always return a Tracker

instead of returning false for options[:exit_on_warn]
上级 c025ae5b
......@@ -42,9 +42,9 @@ unless options[:app_path]
end
#Run scan and output a report
clean = Brakeman.run options.merge(:print_report => true, :quiet => options[:quiet])
tracker = Brakeman.run options.merge(:print_report => true, :quiet => options[:quiet])
#Return error code if --exit-on-warn is used and warnings were found
if options[:exit_on_warn] and not clean
if options[:exit_on_warn] and not tracker.checks.all_warnings.empty?
exit Brakeman::Warnings_Found_Exit_Code
end
......@@ -262,10 +262,6 @@ module Brakeman
puts tracker.report.send(options[:output_format])
end
if options[:exit_on_warn] and not tracker.checks.all_warnings.empty?
return false
end
tracker
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册