Handle nil value for synced_folder_opts

This commit is contained in:
Fabio Rehm 2014-02-12 00:48:20 -02:00
parent 6282b09c6c
commit d4d5603b47

View file

@ -24,7 +24,7 @@ module VagrantPlugins
FileUtils.mkdir_p(cache_root.to_s) unless cache_root.exist?
synced_folder_opts = {id: "vagrant-cache"}
synced_folder_opts.merge!(@env[:machine].config.cache.synced_folder_opts)
synced_folder_opts.merge!(@env[:machine].config.cache.synced_folder_opts || {})
@env[:machine].config.vm.synced_folder cache_root, '/tmp/vagrant-cache', synced_folder_opts
@env[:cache_dirs] = []