clan-cli: Fix deployment as non root edgecase

This commit is contained in:
Qubasa
2025-03-31 20:25:05 +02:00
parent 9bfce828e0
commit fb1cea261e

View File

@@ -161,7 +161,7 @@ def deploy_machines(machines: list[Machine]) -> None:
switch_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"])
test_cmd.extend(["--use-remote-sudo"])