Skip to content

Commit eddb711

Browse files
authored
Merge pull request #260 from Telekom-PD/fix_hosts_update_hang
Fix hang on systems with interactive rm
2 parents 81079f7 + 33e23bf commit eddb711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/vagrant-hostmanager/hosts_file/updater.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def update_guest(machine)
4545
if windir
4646
machine.communicate.sudo("mv -force /tmp/hosts.#{machine.name} #{realhostfile}")
4747
else
48-
machine.communicate.sudo("cat /tmp/hosts.#{machine.name} > #{realhostfile} && rm /tmp/hosts.#{machine.name}")
48+
machine.communicate.sudo("cat /tmp/hosts.#{machine.name} > #{realhostfile} && rm -f /tmp/hosts.#{machine.name}")
4949
end
5050
end
5151

0 commit comments

Comments
 (0)