summaryrefslogtreecommitdiffstats
path: root/lib/puppet/application.rb
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-04-12 16:14:02 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-04-12 16:14:02 -0700
commit40adee4ade3a447a7397a71d76e042091bbbfbff (patch)
treebb169ff744c7a10772a55770ef976ce4f0e82763 /lib/puppet/application.rb
parent8778307ca33a637fe10b601ee737628f2e5f9fbf (diff)
parent7b4d9367b391f75983868046d30928ebc8411f50 (diff)
downloadpuppet-40adee4ade3a447a7397a71d76e042091bbbfbff.tar.gz
puppet-40adee4ade3a447a7397a71d76e042091bbbfbff.tar.xz
puppet-40adee4ade3a447a7397a71d76e042091bbbfbff.zip
Merge branch 'feature/next/6962-self-documenting-strings-actions-and-options' into next
Diffstat (limited to 'lib/puppet/application.rb')
-rw-r--r--lib/puppet/application.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/puppet/application.rb b/lib/puppet/application.rb
index 4c5a5a967..f3a749786 100644
--- a/lib/puppet/application.rb
+++ b/lib/puppet/application.rb
@@ -359,14 +359,10 @@ class Application
end
end
- # scan command line.
- begin
- option_parser.parse!(self.command_line.args)
- rescue OptionParser::ParseError => detail
- $stderr.puts detail
- $stderr.puts "Try 'puppet #{command_line.subcommand_name} --help'"
- exit(1)
- end
+ # Scan command line. We just hand any exceptions to our upper levels,
+ # rather than printing help and exiting, so that we can meaningfully
+ # respond with context-sensitive help if we want to. --daniel 2011-04-12
+ option_parser.parse!(self.command_line.args)
end
def handlearg(opt, arg)