Add MacOS to check to sudo overwrite hostfile

Someone removed the check for MacOS making the replace step be skipped if the OS was Darwin (MacOS)
This commit is contained in:
Guilherme Heuser Prestes 2022-07-27 10:48:00 +02:00 committed by GitHub
parent 3bed35fcad
commit f58a9138f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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."
)