add missing newline to end of file

add missing newline to end of file

From 6d9d904df53dbf14d3d6ca127242bcb803afbbac Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Fri, 23 Nov 2018 15:43:27 +1100
Subject: [PATCH] add missing newline to end of file


diff --git a/script/cache_critical_dns b/script/cache_critical_dns
index a3e893e..3ce06c1 100755
--- a/script/cache_critical_dns
+++ b/script/cache_critical_dns
@@ -37,10 +37,10 @@ def swap_address(hosts, name, ips)
   end
 
   ips.each do |ip|
-    new_file << "#{ip} #{name} # AUTO GENERATED: #{Time.now.iso8601}"
+    new_file << "#{ip} #{name} # AUTO GENERATED: #{Time.now.iso8601}\n"
   end
 
-  new_file.join("\n")
+  new_file.join
 end
 
 def hosts_entries(dns, name)

GitHub

1 Like