summaryrefslogtreecommitdiffstats
path: root/lib/puppet/application
diff options
context:
space:
mode:
authorJacob Helwig <jacob@puppetlabs.com>2011-06-28 17:40:53 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-06-28 17:40:53 -0700
commit8432684e25cc82beb1f5d977dd509fd7bab3901b (patch)
tree02d1bd4a254b1adf04ea574759dfa498c38c7863 /lib/puppet/application
parent1feaf7cf163c060eb213ce5f7a37faa0b7a4716f (diff)
parent8bad457fb68f8550db4c1c4802cb024c4e719d33 (diff)
downloadpuppet-8432684e25cc82beb1f5d977dd509fd7bab3901b.tar.gz
puppet-8432684e25cc82beb1f5d977dd509fd7bab3901b.tar.xz
puppet-8432684e25cc82beb1f5d977dd509fd7bab3901b.zip
Merge branch '2.6.x' into 2.7.x
* 2.6.x: (#7956) Porting cron tests (#7956) Port resource acceptance tests Readying for release of 2.6.9 (#6854) Update Red Hat spec file Bumping release in lib/puppet.rb and updating CHANGELOG. Bumping RPM spec file to 2.6.9rc1. (#7506) Organize READMEs; specify supported Ruby versions in README.md (#6418) Make test 64118 more portable (#7127) Stop puppet if a prerun command fails Do not needlessly create multiple reports when creating a transaction (#4416) Ensure types are providified after reloading (#4416) Always remove old provider before recreating it Cleanup indentation, comment, and unused code Conflicts: CHANGELOG README.md conf/redhat/puppet.spec lib/puppet.rb lib/puppet/transaction.rb spec/unit/configurer_spec.rb spec/unit/transaction_spec.rb
Diffstat (limited to 'lib/puppet/application')
-rw-r--r--lib/puppet/application/apply.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb
index 3ba06d34a..5562a9b09 100644
--- a/lib/puppet/application/apply.rb
+++ b/lib/puppet/application/apply.rb
@@ -213,7 +213,13 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License
configurer = Puppet::Configurer.new
report = configurer.run(:skip_plugin_download => true, :catalog => catalog)
- exit( options[:detailed_exitcodes] ? report.exit_status : 0 )
+ if not report
+ exit(1)
+ elsif options[:detailed_exitcodes] then
+ exit(report.exit_status)
+ else
+ exit(0)
+ end
rescue => detail
puts detail.backtrace if Puppet[:trace]
$stderr.puts detail.message