remove backtrace from stderr for unknown CLI options - close #69

This commit is contained in:
josh committed 2018-11-30 23:29:19 -05:00
1 parent 6180410cc4
commit ba69f05e99
2 files changed
+30 -2

No files matched your search

+12 -2
View File
@@ -43,6 +43,18 @@ module Rscons
# @return [void]
def run(argv)
argv = argv.dup
begin
exit run_toplevel(argv)
rescue OptionParser::InvalidOption => io
$stderr.puts io.message
$stderr.puts USAGE
exit 2
end
end
private
def run_toplevel(argv)
rsconscript = nil
do_help = false
@@ -115,8 +127,6 @@ module Rscons
exit Rscons.application.run(operation, script, operation_options)
end
private
def parse_operation_args(operation, argv)
case operation
when "configure"