Class: Chef::GuardInterpreter::DefaultGuardInterpreter
- Inherits:
-
Object
- Object
- Chef::GuardInterpreter::DefaultGuardInterpreter
- Includes:
- Mixin::ShellOut
- Defined in:
- lib/chef/guard_interpreter/default_guard_interpreter.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods included from Mixin::ShellOut
#a_to_s, #clean_array, #shell_out, #shell_out!, #shell_out_compact, #shell_out_compact!, #shell_out_compact_timeout, #shell_out_compact_timeout!, #shell_out_with_systems_locale, #shell_out_with_systems_locale!
Methods included from Mixin::PathSanity
#enforce_path_sanity, #sanitized_path
Instance Method Details
#evaluate ⇒ Object
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/chef/guard_interpreter/default_guard_interpreter.rb', line 35 def evaluate 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 Chef::Log.warn "Command '#{@command}' timed out" false end |