handle invalid options

This commit is contained in:
rick
2010-08-30 18:50:02 -07:00
parent e0d234c255
commit 7c70174725
+7 -1
View File
@@ -37,7 +37,13 @@ opts = OptionParser.new do |opts|
end
# Read command line options into `options` hash
opts.parse!
begin
opts.parse!
rescue OptionParser::InvalidOption
puts "gollum: #{$!.message}"
puts "gollum: try 'gollum --help' for more information"
exit
end
gollum_path = ARGV[0] || Dir.pwd