Class: Chef::GuardInterpreter::DefaultGuardInterpreter

Inherits:
Object
  • Object
show all
Includes:
Mixin::ShellOut
Defined in:
lib/chef/guard_interpreter/default_guard_interpreter.rb

Direct Known Subclasses

ResourceGuardInterpreter

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

#evaluateObject


35
36
37
38
39
40
41
42
# File 'lib/chef/guard_interpreter/default_guard_interpreter.rb', line 35

def evaluate
  shell_out_with_systems_locale(@command, @command_opts).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