lib/vagrant-hosts/addresses.rb in vagrant-hosts-2.1.4 vs lib/vagrant-hosts/addresses.rb in vagrant-hosts-2.1.5

- old
+ new

@@ -51,9 +51,15 @@ hosts end # @return [Array<Vagrant::Machine>] def all_machines(env) - env.active_machines.map { |vm_id| env.machine(*vm_id) } + env.active_machines.map do |vm_id| + begin + env.machine(*vm_id) + rescue Vagrant::Errors::MachineNotFound + nil + end + end.compact end end