lib/chef/mixin/command.rb in chef-0.8.4 vs lib/chef/mixin/command.rb in chef-0.8.6
- old
+ new
@@ -169,10 +169,10 @@
unless args[:ignore_failure]
args[:returns] ||= 0
if status.exitstatus != args[:returns]
# if the log level is not debug, through output of command when we fail
output = ""
- if Chef::Log.logger.level > 0
+ if Chef::Log.level == :debug
output << "\n---- Begin output of #{args[:command]} ----\n"
output << "#{command_output}"
output << "---- End output of #{args[:command]} ----\n"
end
raise Chef::Exceptions::Exec, "#{args[:command]} returned #{status.exitstatus}, expected #{args[:returns]}#{output}"