Skip to content

Commit 81079f7

Browse files
authored
Merge pull request #236 from chaimpeck/copy-hosts-quotes-fix
Added quotes to location to handle spaces in file paths
2 parents ede8b48 + 901859f commit 81079f7

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
@@ -65,7 +65,7 @@ class << self
6565
line_endings = "crlf"
6666
else
6767
hosts_location = '/etc/hosts'
68-
copy_proc = Proc.new { `[ -w #{hosts_location} ] && cat #{file} > #{hosts_location} || sudo cp #{file} #{hosts_location}` }
68+
copy_proc = Proc.new { `[ -w "#{hosts_location}" ] && cat "#{file}" > "#{hosts_location}" || sudo cp "#{file}" "#{hosts_location}"` }
6969
line_endings = "lf"
7070
end
7171

0 commit comments

Comments
 (0)