diff --git a/lib/vagrant-goodhosts/GoodHosts.rb b/lib/vagrant-goodhosts/GoodHosts.rb index dfc258f..d118f34 100644 --- a/lib/vagrant-goodhosts/GoodHosts.rb +++ b/lib/vagrant-goodhosts/GoodHosts.rb @@ -95,9 +95,9 @@ def addHostEntries next end if cli.include? ".exe" - stdin, stdout, stderr, wait_thr = Open3.popen3(cli, "add", "cl", ip_address, hostnames) + stdin, stdout, stderr, wait_thr = Open3.popen3(cli, "add", "--clean", ip_address, hostnames) else - stdin, stdout, stderr, wait_thr = Open3.popen3("sudo", cli, "add", "cl", ip_address, hostnames) + stdin, stdout, stderr, wait_thr = Open3.popen3("sudo", cli, "add", "--clean", ip_address, hostnames) end if !wait_thr.value.success? error = true @@ -118,9 +118,9 @@ def removeHostEntries next end if cli.include? ".exe" - stdin, stdout, stderr, wait_thr = Open3.popen3(cli, "remove", "cl", ip_address, hostnames) + stdin, stdout, stderr, wait_thr = Open3.popen3(cli, "remove", "--clean", ip_address, hostnames) else - stdin, stdout, stderr, wait_thr = Open3.popen3("sudo", cli, "remove", "cl", ip_address, hostnames) + stdin, stdout, stderr, wait_thr = Open3.popen3("sudo", cli, "remove", "--clean", ip_address, hostnames) end if !wait_thr.value.success? error = true