Rescue invalid commands and present the valid options list (#498)
* rescue invalid commands * recuse invalid command
This commit is contained in:
parent
1492c406e9
commit
9bbfa3add5
|
@ -13,7 +13,10 @@ module GitHubChangelogGenerator
|
|||
ParserFile.new(options).parse!
|
||||
|
||||
parser = setup_parser(options)
|
||||
parser.parse!
|
||||
begin parser.parse!
|
||||
rescue OptionParser::InvalidOption => e
|
||||
abort [e, parser].join("\n")
|
||||
end
|
||||
|
||||
fetch_user_and_project(options)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user