diff --git a/lib/vagrant-cachier/action/ensure_single_cache_root.rb b/lib/vagrant-cachier/action/ensure_single_cache_root.rb index ae46b1e..def6375 100644 --- a/lib/vagrant-cachier/action/ensure_single_cache_root.rb +++ b/lib/vagrant-cachier/action/ensure_single_cache_root.rb @@ -21,7 +21,8 @@ module VagrantPlugins end def cache_scoped_to_machine? - @env[:machine].config.cache.scope.to_sym == :machine + @env[:machine].config.cache.enabled? && + @env[:machine].config.cache.scope.to_sym == :machine end def ensure_single_cache_root_exists! diff --git a/lib/vagrant-cachier/provision_ext.rb b/lib/vagrant-cachier/provision_ext.rb index 21e094e..cd17436 100644 --- a/lib/vagrant-cachier/provision_ext.rb +++ b/lib/vagrant-cachier/provision_ext.rb @@ -34,6 +34,8 @@ module VagrantPlugins end def configure_cache_buckets + return unless @env[:machine].config.cache.enabled? + if @env[:machine].config.cache.auto_detect Bucket.auto_detect(@env) end