From 0b6938d8ab7f19d47241607a333f01de3b9cb742 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 8 Jul 2015 15:43:42 -0600 Subject: [PATCH] core: don't prepare folders in disable ode --- lib/vagrant/action/builtin/synced_folders.rb | 6 ++++-- .../providers/docker/action/host_machine_sync_folders.rb | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/action/builtin/synced_folders.rb b/lib/vagrant/action/builtin/synced_folders.rb index aef6d0e71..230676d66 100644 --- a/lib/vagrant/action/builtin/synced_folders.rb +++ b/lib/vagrant/action/builtin/synced_folders.rb @@ -76,8 +76,10 @@ module Vagrant # Go through each folder and prepare the folders folders.each do |impl, impl_name, fs| - @logger.info("Invoking synced folder prepare for: #{impl_name}") - impl.prepare(env[:machine], fs, impl_opts(impl_name, env)) + if !env[:synced_folders_disable] + @logger.info("Invoking synced folder prepare for: #{impl_name}") + impl.prepare(env[:machine], fs, impl_opts(impl_name, env)) + end end # Continue, we need the VM to be booted. diff --git a/plugins/providers/docker/action/host_machine_sync_folders.rb b/plugins/providers/docker/action/host_machine_sync_folders.rb index 9a6f03893..045b3bd04 100644 --- a/plugins/providers/docker/action/host_machine_sync_folders.rb +++ b/plugins/providers/docker/action/host_machine_sync_folders.rb @@ -147,7 +147,6 @@ module VagrantPlugins if !env[:host_machine_sync_folders] @logger.info("Not syncing folders because container created.") - return end if !new_config.synced_folders.empty?