FIX: script was missing newlines when generating hosts

FIX: script was missing newlines when generating hosts

From 6acabec4233a0db5880f5a63420d8d2c7769f62f Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Wed, 28 Nov 2018 15:18:08 +1100
Subject: [PATCH] FIX: script was missing newlines when generating hosts


diff --git a/script/cache_critical_dns b/script/cache_critical_dns
index 3ce06c1..613a3c7 100755
--- a/script/cache_critical_dns
+++ b/script/cache_critical_dns
@@ -34,6 +34,7 @@ def swap_address(hosts, name, ips)
       next if hostname == name
     end
     new_file << line
+    new_file << "\n"
   end
 
   ips.each do |ip|

GitHub

1 Like