From 12f121e6e452f36cc276b51cb8de66ae1103bf25 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sun, 6 Apr 2014 21:47:24 -0300 Subject: [PATCH] Properly fix GH-96 --- lib/vagrant-cachier/bucket/apt_cacher.rb | 4 ++-- locales/en.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vagrant-cachier/bucket/apt_cacher.rb b/lib/vagrant-cachier/bucket/apt_cacher.rb index 65abe85..7b024f4 100644 --- a/lib/vagrant-cachier/bucket/apt_cacher.rb +++ b/lib/vagrant-cachier/bucket/apt_cacher.rb @@ -11,11 +11,11 @@ module VagrantPlugins def install if guest.capability?(:apt_cacher_dir) if guest_path = guest.capability(:apt_cacher_dir) - synced_folder_type = machine.config.cache.synced_folder_opts[:type] + synced_folder_type = (machine.config.cache.synced_folder_opts || {})[:type] if synced_folder_type && synced_folder_type.to_sym == :nfs symlink(guest_path) else - @env[:ui].info I18n.t('vagrant_cachier.nfs_required', bucket: 'apt-cacher') + @env[:ui].warn I18n.t('vagrant_cachier.nfs_required', bucket: 'apt-cacher') end end else diff --git a/locales/en.yml b/locales/en.yml index 3bca3be..558f06e 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -8,7 +8,7 @@ en: Unknown cache scope '%{cache_scope}' (allowed scopes: %{allowed}) nfs_required: |- The '%{bucket}' cache bucket requires NFS to be enabled, please add - `config.cache.synced_folder_opts = {type: :nfs}` to your Vagrantfile. + `config.cache.synced_folder_opts = {type: :nfs}` to your Vagrantfile. will_fix_machine_cache_dir: |- A vagrant-cachier provider specific cache dir was found under '%{current_path}' and it will be moved to