diff options
Diffstat (limited to 'lib/chef/guard_interpreter/resource_guard_interpreter.rb')
-rw-r--r-- | lib/chef/guard_interpreter/resource_guard_interpreter.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/guard_interpreter/resource_guard_interpreter.rb b/lib/chef/guard_interpreter/resource_guard_interpreter.rb index 346b585d8c..1e2a534c18 100644 --- a/lib/chef/guard_interpreter/resource_guard_interpreter.rb +++ b/lib/chef/guard_interpreter/resource_guard_interpreter.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/guard_interpreter/default_guard_interpreter' +require 'chef/guard_interpreter' class Chef class GuardInterpreter @@ -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}) @@ -95,6 +95,7 @@ class Chef empty_events = Chef::EventDispatch::Dispatcher.new anonymous_run_context = Chef::RunContext.new(parent_resource.node, {}, empty_events) interpreter_resource = resource_class.new('Guard resource', anonymous_run_context) + interpreter_resource.is_guard_interpreter = true interpreter_resource end |