clan-cli: Fix deployment as non root edgecase

This commit is contained in:
Qubasa
2025-03-31 20:25:05 +02:00
parent 081460750d
commit 6f13b3a29c

View File

@@ -161,7 +161,7 @@ def deploy_machines(machines: list[Machine]) -> None:
switch_cmd.extend(["--target-host", target_host.target]) switch_cmd.extend(["--target-host", target_host.target])
test_cmd.extend(["--target-host", target_host.target]) test_cmd.extend(["--target-host", target_host.target])
if target_host and target_host.user != "root": if (target_host and target_host.user != "root") or host.user != "root":
switch_cmd.extend(["--use-remote-sudo"]) switch_cmd.extend(["--use-remote-sudo"])
test_cmd.extend(["--use-remote-sudo"]) test_cmd.extend(["--use-remote-sudo"])