summaryrefslogtreecommitdiff
path: root/lib/chef/mixin
diff options
context:
space:
mode:
authorTyler Ball <tyleraball@gmail.com>2015-01-26 17:08:32 -0800
committerTyler Ball <tyleraball@gmail.com>2015-01-26 17:08:32 -0800
commit4582358979ceb1d5eafd852b2ee0834d013f36a2 (patch)
tree5eaac19a28a2b4e9d6869d955596fe9a65c3c70a /lib/chef/mixin
parent039a841016f84ba6cce321b8d8be91130e419b53 (diff)
parent6f955972033c5117ef83010977a2aa1ff023e691 (diff)
downloadchef-4582358979ceb1d5eafd852b2ee0834d013f36a2.tar.gz
Merge pull request #2717 from chef/tball/guard_interpreter
Guard resources are executed in why_run mode
Diffstat (limited to 'lib/chef/mixin')
-rw-r--r--lib/chef/mixin/why_run.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/mixin/why_run.rb b/lib/chef/mixin/why_run.rb
index d650e3332f..d3acea5490 100644
--- a/lib/chef/mixin/why_run.rb
+++ b/lib/chef/mixin/why_run.rb
@@ -48,7 +48,7 @@ class Chef
# block/proc that implements the action.
def add_action(descriptions, &block)
@actions << [descriptions, block]
- if !Chef::Config[:why_run]
+ if (@resource.respond_to?(:is_guard_interpreter) && @resource.is_guard_interpreter) || !Chef::Config[:why_run]
block.call
end
events.resource_update_applied(@resource, @action, descriptions)