From a885fd524da9d99befbda145d4612ac97f4b3ac4 Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Thu, 14 Dec 2023 22:04:47 +0000 Subject: [PATCH] Avoid updating the hosts file if there is an error --- scripts/update-known-hosts.php | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/update-known-hosts.php b/scripts/update-known-hosts.php index 3099daa9c9..7671b27b23 100755 --- a/scripts/update-known-hosts.php +++ b/scripts/update-known-hosts.php @@ -61,6 +61,7 @@ $scannedHosts[$host] = trim($scanner->getOutput()); } else { $stdErr->writeln(sprintf('Failed to scan host %s: %s', $host, $scanner->getErrorOutput())); + exit(1); } unset($scanners[$host]); }