allow --help CLI option with no Rsconscript present - close #106
This commit is contained in:
parent
bfcd0c0b05
commit
ef2a9084db
@ -121,21 +121,24 @@ module Rscons
|
|||||||
rsconscript = DEFAULT_RSCONSCRIPTS.find do |f|
|
rsconscript = DEFAULT_RSCONSCRIPTS.find do |f|
|
||||||
File.exists?(f)
|
File.exists?(f)
|
||||||
end
|
end
|
||||||
unless rsconscript
|
|
||||||
$stderr.puts "Could not find the Rsconscript to execute."
|
|
||||||
$stderr.puts "Looked for: #{DEFAULT_RSCONSCRIPTS.join(", ")}"
|
|
||||||
exit 1
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
script = Script.new
|
if rsconscript
|
||||||
script.load(rsconscript)
|
script = Script.new
|
||||||
|
script.load(rsconscript)
|
||||||
|
end
|
||||||
|
|
||||||
if do_help
|
if do_help
|
||||||
puts USAGE
|
puts USAGE
|
||||||
exit 0
|
exit 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
unless rsconscript
|
||||||
|
$stderr.puts "Could not find the Rsconscript to execute."
|
||||||
|
$stderr.puts "Looked for: #{DEFAULT_RSCONSCRIPTS.join(", ")}"
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
|
||||||
operation_options = parse_operation_args(operation, argv) || {}
|
operation_options = parse_operation_args(operation, argv) || {}
|
||||||
|
|
||||||
exit Rscons.application.run(operation, script, operation_options)
|
exit Rscons.application.run(operation, script, operation_options)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user