Merge pull request #236 from chaimpeck/copy-hosts-quotes-fix

Added quotes to location to handle spaces in file paths
This commit is contained in:
Seth Reeser 2018-04-17 17:45:44 -04:00 committed by GitHub
commit 81079f706a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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