Prevent errors when caching is disabled
This commit is contained in:
parent
bd847ce053
commit
e46a3c398b
2 changed files with 4 additions and 1 deletions
|
@ -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!
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue