core: don't use active_machines too much, deletes data
This commit is contained in:
parent
0879c1d624
commit
afab61a05f
|
@ -6,6 +6,8 @@ BUG FIXES:
|
||||||
Vagrantfile can cause errors.
|
Vagrantfile can cause errors.
|
||||||
- core: `VAGRANT_VAGRANTFILE` env var only applies to the project
|
- core: `VAGRANT_VAGRANTFILE` env var only applies to the project
|
||||||
Vagrantfile name. [GH-2130]
|
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: Work even with restrictive umask on user. [GH-2121]
|
||||||
- provisioners/chef: Fix environment validation to be less restrictive.
|
- provisioners/chef: Fix environment validation to be less restrictive.
|
||||||
- provisioners/puppet: No more "shared folders cannot be found" error.
|
- provisioners/puppet: No more "shared folders cannot be found" error.
|
||||||
|
|
|
@ -84,6 +84,9 @@ module Vagrant
|
||||||
names ||= []
|
names ||= []
|
||||||
names = [names] if !names.is_a?(Array)
|
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
|
# This is a helper that gets a single machine with the proper
|
||||||
# provider. The "proper provider" in this case depends on what was
|
# provider. The "proper provider" in this case depends on what was
|
||||||
# given:
|
# given:
|
||||||
|
@ -101,7 +104,7 @@ module Vagrant
|
||||||
provider_to_use = options[:provider]
|
provider_to_use = options[:provider]
|
||||||
provider_to_use = provider_to_use.to_sym if provider_to_use
|
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
|
if name == active_name
|
||||||
# We found an active machine with the same name
|
# We found an active machine with the same name
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue