Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
1
-
Client 2016-07-27
-
Bug Fix
-
fix a regression from commit eccd3b which modified puppet to not swallow errors silently, but it caused a regression when a puppet sub-application raises an error
Description
PUP-3521 (commit eccd3b modified puppet to not swallow errors silently, but it causes a regression because the result variable is not in scope. To reproduce, modify an app in lib/puppet/application/*.rb to raise an ArgumentError in its help method, then run:
bundle exec puppet help
|
Error: undefined local variable or method `result' for #<Puppet::Interface:0x007fab1b563218>
|
...
|
The problem line is:
rescue StandardError |
result << [ "! #{appname}", "! Subcommand unavailable due to error. Check error logs." ] |
end |
Although the reproduction steps are contrived, I ran into this problem when I had an application in a module and the application called Puppet.settings.initialize_settings twice, which causes puppet to raise an exception.
Attachments
Issue Links
- relates to
-
PUP-3521 puppet incorrectly swallows some errors
-
- Closed
-