diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2011-02-25 11:45:38 -0800 |
|---|---|---|
| committer | Jesse Wolfe <jes5199@gmail.com> | 2011-02-25 13:18:36 -0800 |
| commit | 23eb77d999acb73021547c5ef86adf609e202605 (patch) | |
| tree | 1dedbea6b4c785e2915c4ed6cbde38a6d205231a /lib/puppet/application | |
| parent | a42e796fa88574ef97a99b034c4229b961bdac60 (diff) | |
| download | puppet-23eb77d999acb73021547c5ef86adf609e202605.tar.gz puppet-23eb77d999acb73021547c5ef86adf609e202605.tar.xz puppet-23eb77d999acb73021547c5ef86adf609e202605.zip | |
(#6322) --noop should not suppress error codes
The noop option has been suppressing exit statuses. This is
counterintuitive, as per discussion at http://projects.puppetlabs.com/issues/6322
This patch causes noop runs to return the same exit codes as real runs.
Reviewed-By: Daniel Pittman <daniel@puppetlabs.com>
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/agent.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/application/apply.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb index 895156f11..3749241f8 100644 --- a/lib/puppet/application/agent.rb +++ b/lib/puppet/application/agent.rb @@ -119,7 +119,7 @@ class Puppet::Application::Agent < Puppet::Application if not report exit(1) - elsif not Puppet[:noop] and options[:detailed_exitcodes] then + elsif options[:detailed_exitcodes] then exit(report.exit_status) else exit(0) diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb index 8f5aa86d0..cc733e1f5 100644 --- a/lib/puppet/application/apply.rb +++ b/lib/puppet/application/apply.rb @@ -125,7 +125,7 @@ class Puppet::Application::Apply < Puppet::Application configurer = Puppet::Configurer.new report = configurer.run(:skip_plugin_download => true, :catalog => catalog) - exit( Puppet[:noop] ? 0 : options[:detailed_exitcodes] ? report.exit_status : 0 ) + exit( options[:detailed_exitcodes] ? report.exit_status : 0 ) rescue => detail puts detail.backtrace if Puppet[:trace] $stderr.puts detail.message |
