From 733e4512168d100dfc3b777b06cf39fb7ceff32a Mon Sep 17 00:00:00 2001 From: Brian Johnson Date: Thu, 13 Jun 2013 16:20:00 -0700 Subject: [PATCH] Fix overwrite bug that was inadvertently regressed in the merge. --- lib/vagrant-hostmanager/hosts_file.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/vagrant-hostmanager/hosts_file.rb b/lib/vagrant-hostmanager/hosts_file.rb index 508ff82..41e2c4d 100644 --- a/lib/vagrant-hostmanager/hosts_file.rb +++ b/lib/vagrant-hostmanager/hosts_file.rb @@ -22,13 +22,12 @@ module VagrantPlugins machines.each do |m| @logger.info "Adding entry for #{m.name} to hosts.#{name}" update_entry(m,path.join("hosts.#{name}")) - m.communicate.upload(path.join("hosts.#{name}"), '/tmp/hosts') - m.communicate.sudo("mv /tmp/hosts /etc/hosts") end end + env.machine(name,p).communicate.upload(path.join("hosts.#{name}"), '/tmp/hosts') + env.machine(name,p).communicate.sudo("mv /tmp/hosts /etc/hosts") end - machines end # delete victim machine from all guests