From 901859fff0b1d24a571fbfb1e721a7113f46525d Mon Sep 17 00:00:00 2001 From: Jeff Peck Date: Sun, 28 May 2017 01:36:59 -0400 Subject: [PATCH] Added quotes to location to handle spaces in file paths --- lib/vagrant-hostmanager/hosts_file/updater.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant-hostmanager/hosts_file/updater.rb b/lib/vagrant-hostmanager/hosts_file/updater.rb index fdae4d9..1a10472 100644 --- a/lib/vagrant-hostmanager/hosts_file/updater.rb +++ b/lib/vagrant-hostmanager/hosts_file/updater.rb @@ -65,7 +65,7 @@ module VagrantPlugins line_endings = "crlf" else hosts_location = '/etc/hosts' - copy_proc = Proc.new { `[ -w #{hosts_location} ] && cat #{file} > #{hosts_location} || sudo cp #{file} #{hosts_location}` } + copy_proc = Proc.new { `[ -w "#{hosts_location}" ] && cat "#{file}" > "#{hosts_location}" || sudo cp "#{file}" "#{hosts_location}"` } line_endings = "lf" end