Merge pull request 'pkgs/clan: Fix clan ssh subcommand' (#4124) from mic92/kenji/ke-fix-ssh-deploy into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4124
This commit is contained in:
Mic92
2025-06-27 16:57:07 +00:00

View File

@@ -93,13 +93,14 @@ class DeployInfo:
def find_reachable_host(deploy_info: DeployInfo) -> Remote | None:
host = None
# If we only have one address, we have no choice but to use it.
if len(deploy_info.addrs) == 1:
return deploy_info.addrs[0]
for addr in deploy_info.addrs:
if addr.is_ssh_reachable():
host = addr
break
return host
return addr
return None
def ssh_shell_from_deploy(deploy_info: DeployInfo) -> None: