Skip to content

Commit fec2c50

Browse files
author
Paulo Bittencourt
committed
Fix regression in #52.
We accidentally stopped filtering out machines from other providers.
1 parent 93fd353 commit fec2c50

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/vagrant-hostmanager/hosts_file.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ def get_machines
100100
machines = @global_env.machine_names
101101
else
102102
machines = @global_env.active_machines
103+
.select { |name, provider| provider == @provider }
104+
.collect { |name, provider| name }
103105
end
104106
# Collect only machines that exist for the current provider
105-
machines.collect do |name, _|
107+
machines.collect do |name|
106108
begin
107109
machine = @global_env.machine(name, @provider)
108110
rescue Vagrant::Errors::MachineNotFound

0 commit comments

Comments
 (0)