# File lib/chef/client.rb, line 293 def sync_cookbooks Chef::Log.debug("Synchronizing cookbooks") cookbook_hash = rest.post_rest("environments/#{@node.chef_environment}/cookbook_versions", {:run_list => @expanded_run_list_with_versions}) 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