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
|
end
|
||||||
|
|
||||||
def cache_scoped_to_machine?
|
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
|
end
|
||||||
|
|
||||||
def ensure_single_cache_root_exists!
|
def ensure_single_cache_root_exists!
|
||||||
|
|
|
@ -34,6 +34,8 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
def configure_cache_buckets
|
def configure_cache_buckets
|
||||||
|
return unless @env[:machine].config.cache.enabled?
|
||||||
|
|
||||||
if @env[:machine].config.cache.auto_detect
|
if @env[:machine].config.cache.auto_detect
|
||||||
Bucket.auto_detect(@env)
|
Bucket.auto_detect(@env)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue