fix: resolved permission issue by adjusting subprocess call to explicitly use Python

This commit is contained in:
Whispering Wind
2025-05-02 13:41:34 +03:30
committed by GitHub
parent 2008156e20
commit 18d7f3459e

View File

@ -34,9 +34,7 @@ def update_port(port):
with open(CONFIG_FILE, 'w') as f: with open(CONFIG_FILE, 'w') as f:
json.dump(config, f, indent=2) json.dump(config, f, indent=2)
subprocess.run([CLI_PATH, "restart-hysteria2"], subprocess.run(["python3", CLI_PATH, "restart-hysteria2"],)
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
print(f"Port changed successfully to {port}.") print(f"Port changed successfully to {port}.")
return True return True