diff --git a/lib/vagrant/provisioners/chef.rb b/lib/vagrant/provisioners/chef.rb index 9606caaba..85781a8df 100644 --- a/lib/vagrant/provisioners/chef.rb +++ b/lib/vagrant/provisioners/chef.rb @@ -28,7 +28,7 @@ module Vagrant @client_key_path = "/etc/chef/client.pem" @node_name = "client" - @cookbooks_path = "cookbooks" + @cookbooks_path = ["cookbooks", [:vm, "cookbooks"]] @roles_path = [] @provisioning_path = "/tmp/vagrant-chef" @log_level = :info diff --git a/lib/vagrant/provisioners/chef_solo.rb b/lib/vagrant/provisioners/chef_solo.rb index a38c94990..473c5b8bb 100644 --- a/lib/vagrant/provisioners/chef_solo.rb +++ b/lib/vagrant/provisioners/chef_solo.rb @@ -106,10 +106,7 @@ module Vagrant end def cookbooks_path - result = folders_path(env.config.chef.cookbooks_path, "cookbooks") - result = [result, File.join(env.config.chef.provisioning_path, "cookbooks")].flatten if env.config.chef.recipe_url - - result.to_json + folders_path(env.config.chef.cookbooks_path, "cookbooks").to_json end def roles_path diff --git a/test/vagrant/provisioners/chef_solo_test.rb b/test/vagrant/provisioners/chef_solo_test.rb index f74aa938f..80ffcacc4 100644 --- a/test/vagrant/provisioners/chef_solo_test.rb +++ b/test/vagrant/provisioners/chef_solo_test.rb @@ -142,14 +142,6 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase @action.expects(:folders_path).with(@env.config.chef.cookbooks_path, "cookbooks").once.returns(result) assert_equal result.to_json, @action.cookbooks_path end - - should "append a bare cookbooks path to the cookbooks path for recipe URL" do - @env.config.chef.recipe_url = "foo" - @action.stubs(:folders_path).returns([]) - result = @action.cookbooks_path - assert result - assert result =~ /\/cookbooks"\]$/ - end end context "roles path" do