diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2011-07-25 16:18:54 -0700 |
|---|---|---|
| committer | Matt Robinson <matt@puppetlabs.com> | 2011-07-25 16:27:05 -0700 |
| commit | 778127d0c3cf01701d227ec88a8e5e6550638c35 (patch) | |
| tree | cfe417ff67827a9176f68b58f3b049b8e2e4327c /lib/puppet/application | |
| parent | 62b6b0c438803ab216e2f03024786692c352876b (diff) | |
| download | puppet-778127d0c3cf01701d227ec88a8e5e6550638c35.tar.gz puppet-778127d0c3cf01701d227ec88a8e5e6550638c35.tar.xz puppet-778127d0c3cf01701d227ec88a8e5e6550638c35.zip | |
maint: Fix cert app to print help and exit if no subcommand
In 2.6.x this was the behavior, but the changes to the way options
parsing worked in 2.7.x to support faces changed the behavior of how
help was called.
This resulted in the follow unhelpful error message when you just called
`puppet cert`:
/Users/matthewrobinson/work/puppet/lib/puppet/ssl/certificate_authority/interface.rb:85:in `method='
Invalid method to apply
Reviewed-by: Pieter van de Bruggen <pieter@puppetlabs.com>
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/cert.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/puppet/application/cert.rb b/lib/puppet/application/cert.rb index 162672b6a..330fba8bd 100644 --- a/lib/puppet/application/cert.rb +++ b/lib/puppet/application/cert.rb @@ -218,7 +218,8 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License if sub = self.command_line.args.shift then self.subcommand = sub else - help + puts help + exit end end result |
