From fec2c501fdd7661d7850755d950fce3a7d9adb52 Mon Sep 17 00:00:00 2001 From: Paulo Bittencourt Date: Mon, 24 Feb 2014 13:10:37 -0500 Subject: [PATCH] Fix regression in #52. We accidentally stopped filtering out machines from other providers. --- lib/vagrant-hostmanager/hosts_file.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vagrant-hostmanager/hosts_file.rb b/lib/vagrant-hostmanager/hosts_file.rb index 3e5e831..123ffa5 100644 --- a/lib/vagrant-hostmanager/hosts_file.rb +++ b/lib/vagrant-hostmanager/hosts_file.rb @@ -100,9 +100,11 @@ module VagrantPlugins machines = @global_env.machine_names else machines = @global_env.active_machines + .select { |name, provider| provider == @provider } + .collect { |name, provider| name } end # Collect only machines that exist for the current provider - machines.collect do |name, _| + machines.collect do |name| begin machine = @global_env.machine(name, @provider) rescue Vagrant::Errors::MachineNotFound