diff options
author | Nathan Williams <nath.e.will@gmail.com> | 2017-07-23 22:10:59 -0700 |
---|---|---|
committer | Nathan Williams <nath.e.will@gmail.com> | 2017-07-23 22:14:33 -0700 |
commit | feff35cc355bd3512f1590191e1a5cef9d8e7736 (patch) | |
tree | 398514ca9108947caf27431b02f3d29c0b388cd0 | |
parent | 20e69231e1bdb153529e19425599b145dd800ffd (diff) | |
download | chef-feff35cc355bd3512f1590191e1a5cef9d8e7736.tar.gz |
surface guard interpreter errors for debugging
Signed-off-by: Nathan Williams <nath.e.will@gmail.com>
-rw-r--r-- | lib/chef/guard_interpreter/default_guard_interpreter.rb | 4 |
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 |