# File lib/chef/mixin/command.rb, line 53 def only_if(command, args = {}) if command.kind_of?(Proc) chdir_or_tmpdir(args[:cwd]) do res = command.call unless res return false end end else status = run_command({:command => command, :ignore_failure => true}.merge(args)) if status.exitstatus != 0 return false end end true end