mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-09-24 14:20:09 +01:00
Fix breakage for Linux
Partially revert commit https://github.com/StevenBlack/hosts/commit/0a99194b2844bbc026ab62da69798fdc34815a79 to fix #2015
This commit is contained in:
+1
-1
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user