Do not attempt chmods when the plugin is disabled

This commit is contained in:
Fabio Rehm 2014-02-12 00:49:00 -02:00
parent 8d6c7c62da
commit 1fa46ca2d4

View file

@ -13,6 +13,8 @@ module VagrantPlugins
def call(env) def call(env)
@app.call(env) @app.call(env)
return unless env[:machine].config.cache.enabled?
chmod_bucket_root(env[:machine]) if @opts[:chmod] chmod_bucket_root(env[:machine]) if @opts[:chmod]
configure_cache_buckets(env) configure_cache_buckets(env)
end end
@ -23,8 +25,6 @@ module VagrantPlugins
end end
def configure_cache_buckets(env) def configure_cache_buckets(env)
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