diff --git a/lib/github_changelog_generator/parser.rb b/lib/github_changelog_generator/parser.rb index 4c836cf..e3a1ab5 100755 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -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)