From 1fa46ca2d4e16dd5ddb3d7df84627f8d2996e3e3 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Wed, 12 Feb 2014 00:49:00 -0200 Subject: [PATCH] Do not attempt `chmod`s when the plugin is disabled --- lib/vagrant-cachier/action/install_buckets.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-cachier/action/install_buckets.rb b/lib/vagrant-cachier/action/install_buckets.rb index 96f83ef..aeb8037 100644 --- a/lib/vagrant-cachier/action/install_buckets.rb +++ b/lib/vagrant-cachier/action/install_buckets.rb @@ -13,6 +13,8 @@ module VagrantPlugins def call(env) @app.call(env) + return unless env[:machine].config.cache.enabled? + chmod_bucket_root(env[:machine]) if @opts[:chmod] configure_cache_buckets(env) end @@ -23,8 +25,6 @@ module VagrantPlugins end def configure_cache_buckets(env) - return unless env[:machine].config.cache.enabled? - if env[:machine].config.cache.auto_detect Bucket.auto_detect(env) end