Merge pull request #73 from fgrehm/67-fix-nfs-for-vagrant-1.4
Fix NFS configs for 1.4
This commit is contained in:
commit
02ac1769d2
1 changed files with 6 additions and 2 deletions
|
@ -17,8 +17,12 @@ module VagrantPlugins
|
||||||
|
|
||||||
FileUtils.mkdir_p(cache_root.to_s) unless cache_root.exist?
|
FileUtils.mkdir_p(cache_root.to_s) unless cache_root.exist?
|
||||||
|
|
||||||
nfs_flag = env[:machine].config.cache.enable_nfs
|
synced_folder_opts = {id: "vagrant-cache"}
|
||||||
env[:machine].config.vm.synced_folder cache_root, '/tmp/vagrant-cache', id: "vagrant-cache", nfs: nfs_flag
|
if env[:machine].config.cache.enable_nfs
|
||||||
|
# REFACTOR: Drop the `nfs: true` argument once we drop support for Vagrant < 1.4
|
||||||
|
synced_folder_opts.merge!({ nfs: true, type: 'nfs' })
|
||||||
|
end
|
||||||
|
env[:machine].config.vm.synced_folder cache_root, '/tmp/vagrant-cache', synced_folder_opts
|
||||||
|
|
||||||
env[:cache_dirs] = []
|
env[:cache_dirs] = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue