提交 a96f6772 编写于 作者: J Justin Collins 提交者: Dave Worth

Nicer error message on option parsing failures

上级 044e4c8b
......@@ -7,7 +7,13 @@ require 'brakeman/options'
require 'brakeman/version'
#Parse options
options, parser = Brakeman::Options.parse! ARGV
begin
options, parser = Brakeman::Options.parse! ARGV
rescue OptionParser::ParseError => e
$stderr.puts e.message.capitalize
$stderr.puts "Please see `brakeman --help` for valid options"
exit
end
#Exit early for these options
if options[:list_checks]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册