Handle nil value for synced_folder_opts

This commit is contained in:
Fabio Rehm 2014-02-12 00:48:20 -02:00
parent 0dd1b20053
commit 8d6c7c62da

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] = []