Merge pull request #2022 from DPTJKKVH/master

Fix breakage for Linux
This commit is contained in:
Steven Black 2022-07-25 09:55:59 -04:00 committed by GitHub
commit c5a79cec41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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."
)
try:
subprocess.run(SUDO + [f"'cp {filename} {target_file}'"], check=True, shell=True)
subprocess.run(SUDO + ["cp", filename, target_file], check=True)
return True
except subprocess.CalledProcessError:
print_failure(f"Replacing {target_file} failed.")