From 1245a0c1c86d52aea58a62dff7d8ab811feb4080 Mon Sep 17 00:00:00 2001 From: Lincoln Stoll Date: Mon, 12 Apr 2010 22:30:06 +0200 Subject: [PATCH] Shorten shared folder names On some setups, the generated name is truncated, which causes issues because they then look the same, and the kernel throws duplicate filename errors. Shorten the name so this doesn't happen --- lib/vagrant/provisioners/chef_solo.rb | 4 ++-- test/vagrant/provisioners/chef_solo_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/vagrant/provisioners/chef_solo.rb b/lib/vagrant/provisioners/chef_solo.rb index 87266ea07..8aba185f8 100644 --- a/lib/vagrant/provisioners/chef_solo.rb +++ b/lib/vagrant/provisioners/chef_solo.rb @@ -16,13 +16,13 @@ module Vagrant def share_cookbook_folders host_cookbook_paths.each_with_index do |cookbook, i| - env.config.vm.share_folder("vcsc-#{i}", cookbook_path(i), cookbook) + env.config.vm.share_folder("vagrant-csc-#{i}", cookbook_path(i), cookbook) end end def share_role_folders host_role_paths.each_with_index do |role, i| - env.config.vm.share_folder("vcsr-#{i}", role_path(i), role) + env.config.vm.share_folder("vagrant-csr-#{i}", role_path(i), role) end end diff --git a/test/vagrant/provisioners/chef_solo_test.rb b/test/vagrant/provisioners/chef_solo_test.rb index 32ca469ca..2bfb2da14 100644 --- a/test/vagrant/provisioners/chef_solo_test.rb +++ b/test/vagrant/provisioners/chef_solo_test.rb @@ -38,7 +38,7 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase should "share each cookbook folder" do share_seq = sequence("share_seq") @host_cookbook_paths.each_with_index do |cookbook, i| - @env.config.vm.expects(:share_folder).with("vcsc-#{i}", @action.cookbook_path(i), cookbook).in_sequence(share_seq) + @env.config.vm.expects(:share_folder).with("vagrant-csc-#{i}", @action.cookbook_path(i), cookbook).in_sequence(share_seq) end @action.share_cookbook_folders @@ -54,7 +54,7 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase should "share each role folder" do share_seq = sequence("share_seq") @host_role_paths.each_with_index do |role, i| - @env.config.vm.expects(:share_folder).with("vcsr-#{i}", @action.role_path(i), role).in_sequence(share_seq) + @env.config.vm.expects(:share_folder).with("vagrant-csr-#{i}", @action.role_path(i), role).in_sequence(share_seq) end @action.share_role_folders