handle invalid options
This commit is contained in:
@@ -37,7 +37,13 @@ opts = OptionParser.new do |opts|
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Read command line options into `options` hash
|
# Read command line options into `options` hash
|
||||||
|
begin
|
||||||
opts.parse!
|
opts.parse!
|
||||||
|
rescue OptionParser::InvalidOption
|
||||||
|
puts "gollum: #{$!.message}"
|
||||||
|
puts "gollum: try 'gollum --help' for more information"
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
gollum_path = ARGV[0] || Dir.pwd
|
gollum_path = ARGV[0] || Dir.pwd
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user