Prevent errors when caching is disabled

This commit is contained in:
Fabio Rehm 2013-08-06 17:31:55 -03:00
parent bd847ce053
commit e46a3c398b
2 changed files with 4 additions and 1 deletions

View file

@ -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!

View file

@ -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