Add MacOS to check to sudo overwrite hostfile
authorGuilherme Heuser Prestes <redacted>
Wed, 27 Jul 2022 08:48:00 +0000 (10:48 +0200)
committerGitHub <redacted>
Wed, 27 Jul 2022 08:48:00 +0000 (10:48 +0200)
Someone removed the check for MacOS making the replace step be skipped if the OS was Darwin (MacOS)

updateHostsFile.py

index 429ab94764e86a753f49655af3d7cce8894cd676..537148c0135944db52b013f76ae70207bc65243a 100755 (executable)
@@ -1307,7 +1307,7 @@ def move_hosts_file_into_place(final_file):
         except Exception:
             print_failure(f"Replacing content of {target_file} failed.")
             return False
-    elif platform.system() == "Linux" or platform.system() == "Windows":
+    elif platform.system() == "Linux" or platform.system() == "Windows" or platform.system() == "Darwin":
         print(
             f"Replacing {target_file} requires root privileges. You might need to enter your password."
         )
git clone https://git.99rst.org/PROJECT