# File lib/chef/client.rb, line 250 def sync_cookbooks Chef::Log.debug("Synchronizing cookbooks") cookbook_hash = rest.get_rest("nodes/#{node_name}/cookbooks") Chef::CookbookVersion.sync_cookbooks(cookbook_hash) # register the file cache path in the cookbook path so that CookbookLoader actually picks up the synced cookbooks Chef::Config[:cookbook_path] = File.join(Chef::Config[:file_cache_path], "cookbooks") cookbook_hash end