Skip to content

Commit 7bee95f

Browse files
committed
Merge pull request #139 from la-magra/is-crlf-hosts-file
Fix situation with hosts file line endings
2 parents cf65149 + ca57c23 commit 7bee95f

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
@@ -75,7 +75,7 @@ def update_file(file, resolving_machine = nil, include_id = true)
7575
file = Pathname.new(file)
7676
old_file_content = file.read
7777
new_file_content = update_content(old_file_content, resolving_machine, include_id)
78-
file.open('w') { |io| io.write(new_file_content) }
78+
file.open('wb') { |io| io.write(new_file_content) }
7979
old_file_content != new_file_content
8080
end
8181

0 commit comments

Comments
 (0)