Skip to content

Commit

Permalink
Merge branch 'patch-1' of https://github.com/tkdb/vagrant-hostsupdater
Browse files Browse the repository at this point in the history
…into tkdb-patch-1
  • Loading branch information
Chris Smith authored and Chris Smith committed Nov 7, 2015
2 parents 6a67853 + 037cc44 commit cb1320f
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 @@ -74,7 +74,7 @@ def getHostEntries(ip, hostnames, name, uuid = self.uuid)

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

0 comments on commit cb1320f

Please sign in to comment.