summaryrefslogtreecommitdiff
path: root/lib/chef/guard_interpreter
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2015-02-13 09:45:57 -0800
committertyler-ball <tyleraball@gmail.com>2015-02-13 15:57:18 -0800
commita5f29b1245cfeb5b726bed373331f34014c6199b (patch)
tree292c32fddeafda71855ac130a9903a472a235dc8 /lib/chef/guard_interpreter
parentbf0240b07f00348d4cb60e72c955e0bc3982abda (diff)
downloadchef-a5f29b1245cfeb5b726bed373331f34014c6199b.tar.gz
Completeting changes from https://github.com/chef/chef/pull/2688, fixes https://github.com/chef/chef/issues/2683
Diffstat (limited to 'lib/chef/guard_interpreter')
-rw-r--r--lib/chef/guard_interpreter/resource_guard_interpreter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/guard_interpreter/resource_guard_interpreter.rb b/lib/chef/guard_interpreter/resource_guard_interpreter.rb
index 7d9bccb6ca..fb545c95eb 100644
--- a/lib/chef/guard_interpreter/resource_guard_interpreter.rb
+++ b/lib/chef/guard_interpreter/resource_guard_interpreter.rb
@@ -41,7 +41,7 @@ class Chef
# attribute by checking the type of the resources.
# We need to make sure we check for Script first because any resource
# that can get to here is an Execute resource.
- if @parent_resource.is_a? Chef::Resource::Script
+ if @resource.is_a? Chef::Resource::Script
block_attributes = @command_opts.merge({:code => @command})
else
block_attributes = @command_opts.merge({:command => @command})