Commit 191622a9 authored by Chris Roberts's avatar Chris Roberts
Browse files

Use `context` variable when defining new resource

parent 1118af7e
......@@ -21,7 +21,7 @@ class Chef
context.resource_collection.lookup('dpkg_autostart[bin_file]')
true
rescue Chef::Exceptions::ResourceNotFound
bin = Chef::Resource::DpkgAutostart.new('bin_file', node.run_context)
bin = Chef::Resource::DpkgAutostart.new('bin_file', context)
bin.action :create
current_resources = context.resource_collection.all_resources
[bin, current_resources].flatten.each_with_index do |res, i|
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment