Fix hang on systems with interactive rm
Some systems configure `rm` to prompt when deleting a file as root
user. On such systems, hostmanager hangs when updating the hosts file
since commit 84d2f9e4be ("fix host file management to be windows and
linux compatible").
Avoid this by adding the '-f' parameter to rm.
			
			
This commit is contained in:
		
							parent
							
								
									ede8b487f3
								
							
						
					
					
						commit
						33e23bffb9
					
				|  | @ -45,7 +45,7 @@ module VagrantPlugins | |||
|             if windir | ||||
|               machine.communicate.sudo("mv -force /tmp/hosts.#{machine.name} #{realhostfile}") | ||||
|             else | ||||
|               machine.communicate.sudo("cat /tmp/hosts.#{machine.name} > #{realhostfile} && rm /tmp/hosts.#{machine.name}") | ||||
|               machine.communicate.sudo("cat /tmp/hosts.#{machine.name} > #{realhostfile} && rm -f /tmp/hosts.#{machine.name}") | ||||
|             end | ||||
|           end | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Simon Baatz
						Simon Baatz