diff options
author | Thom May <thom@may.lt> | 2018-02-26 18:56:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-26 18:56:59 +0000 |
commit | 5594a13550d00e2da286358ac02c7f66f4e8f10e (patch) | |
tree | a40071fdad560ed99204767f8467de02bd56cfdd | |
parent | 5ab3b0903ab408ccd014228e9b69bae5c1d58cac (diff) | |
parent | feff35cc355bd3512f1590191e1a5cef9d8e7736 (diff) | |
download | chef-5594a13550d00e2da286358ac02c7f66f4e8f10e.tar.gz |
Merge pull request #5972 from nathwill/surface-guard-interpreter-errors
surface default guard interpreter errors
-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 |