summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/guard_interpreter/default_guard_interpreter.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/guard_interpreter/default_guard_interpreter.rb b/lib/chef/guard_interpreter/default_guard_interpreter.rb
index f93c0e04f0..52dc803858 100644
--- a/lib/chef/guard_interpreter/default_guard_interpreter.rb
+++ b/lib/chef/guard_interpreter/default_guard_interpreter.rb
@@ -33,7 +33,9 @@ class Chef
public
def evaluate
- shell_out_with_systems_locale(@command, @command_opts).status.success?
+ result = shell_out_with_systems_locale(@command, @command_opts)
+ Chef::Log.debug "Command failed: #{result.stderr}" unless result.status.success?
+ result.status.success?
# Timeout fails command rather than chef-client run, see:
# https://tickets.opscode.com/browse/CHEF-2690
rescue Chef::Exceptions::CommandTimeout