Fix breakage for Linux

Partially revert commit 0a99194b28 to fix #2015
This commit is contained in:
DPTJKKVH
2022-07-25 12:22:30 +00:00
committed by GitHub
parent 236adfb388
commit 057f4ed0f4

View File

@@ -1312,7 +1312,7 @@ def move_hosts_file_into_place(final_file):
f"Replacing {target_file} requires root privileges. You might need to enter your password." f"Replacing {target_file} requires root privileges. You might need to enter your password."
) )
try: try:
subprocess.run(SUDO + [f"'cp {filename} {target_file}'"], check=True, shell=True) subprocess.run(SUDO + ["cp", filename, target_file], check=True)
return True return True
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
print_failure(f"Replacing {target_file} failed.") print_failure(f"Replacing {target_file} failed.")