From 4226e018d7c8e2d52ef59edf37d3a320aa823be0 Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Fri, 18 Dec 2009 14:55:37 -0800 Subject: Fix for #2959 (calling exit status on a nil report) Signed-off-by: Markus Roberts --- lib/puppet/application/puppetd.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/puppet/application') diff --git a/lib/puppet/application/puppetd.rb b/lib/puppet/application/puppetd.rb index c1f733183..4230719ad 100644 --- a/lib/puppet/application/puppetd.rb +++ b/lib/puppet/application/puppetd.rb @@ -114,7 +114,9 @@ Puppet::Application.new(:puppetd) do Puppet.err detail.to_s end - if not Puppet[:noop] and options[:detailed_exitcodes] then + if not report + exit(1) + elsif not Puppet[:noop] and options[:detailed_exitcodes] then exit(report.exit_status) else exit(0) -- cgit