core: don't use active_machines too much, deletes data

This commit is contained in:
Mitchell Hashimoto 2013-09-06 00:10:23 -07:00
parent 0879c1d624
commit afab61a05f
2 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,8 @@ BUG FIXES:
Vagrantfile can cause errors.
- core: `VAGRANT_VAGRANTFILE` env var only applies to the project
Vagrantfile name. [GH-2130]
- core: Fix an issue where the data directory would be deleted too
quickly in a multi-VM environment.
- provisioners/chef: Work even with restrictive umask on user. [GH-2121]
- provisioners/chef: Fix environment validation to be less restrictive.
- provisioners/puppet: No more "shared folders cannot be found" error.

View File

@ -84,6 +84,9 @@ module Vagrant
names ||= []
names = [names] if !names.is_a?(Array)
# Cache the active machines outside the loop
active_machines = @env.active_machines
# This is a helper that gets a single machine with the proper
# provider. The "proper provider" in this case depends on what was
# given:
@ -101,7 +104,7 @@ module Vagrant
provider_to_use = options[:provider]
provider_to_use = provider_to_use.to_sym if provider_to_use
@env.active_machines.each do |active_name, active_provider|
active_machines.each do |active_name, active_provider|
if name == active_name
# We found an active machine with the same name