Skip to content

Commit

Permalink
added a newline before appending it to hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
agiledivider committed Jun 26, 2013
1 parent 1f78ea4 commit 423a13c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vagrant-hostsupdater/HostsUpdater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def getHostEntries(ip, hostnames, name, uuid = self.uuid)

def addToHosts(entries)
return if entries.length == 0
content = entries.join("\n")
content = "\n" + entries.join("\n").strip
if !File.writable?(@@hosts_path)
sudo(%Q(sh -c 'echo "#{content}" >> #@@hosts_path'))
else
Expand Down

0 comments on commit 423a13c

Please sign in to comment.