Don't share default chef folder if doesn't exist on host

This commit is contained in:
Mitchell Hashimoto 2013-04-02 15:04:06 -07:00
parent a8a7a7865d
commit 8458166c6a
2 changed files with 7 additions and 2 deletions

View File

@ -25,6 +25,7 @@ BUG FIXES:
- Action hook prepend/append will only prepend or append once. - Action hook prepend/append will only prepend or append once.
- Retry SSH on Errno::EACCES. - Retry SSH on Errno::EACCES.
- Show an error if an invalid network type is used. - Show an error if an invalid network type is used.
- Don't share Chef solo folder if it doesn't exist on host.
## 1.1.4 (March 25, 2013) ## 1.1.4 (March 25, 2013)

View File

@ -69,8 +69,12 @@ module VagrantPlugins
# Get the expanded path that the host path points to # Get the expanded path that the host path points to
local_path = File.expand_path(path, @machine.env.root_path) local_path = File.expand_path(path, @machine.env.root_path)
# Path exists on the host, setup the remote path if local_path.exist?
remote_path = "#{@config.provisioning_path}/chef-solo-#{get_and_update_counter(:cookbooks_path)}" # Path exists on the host, setup the remote path
remote_path = "#{@config.provisioning_path}/chef-solo-#{get_and_update_counter(:cookbooks_path)}"
else
@logger.warn("Chef path doesn't exist, not sharing: #{local_path}")
end
else else
# Path already exists on the virtual machine. Expand it # Path already exists on the virtual machine. Expand it
# relative to where we're provisioning. # relative to where we're provisioning.