clan-cli: Fix bug where --host-key-check is not applied to build-host
This commit is contained in:
@@ -143,6 +143,9 @@ class HostKeyCheck(Enum):
|
||||
description = "Choose from: " + ", ".join(HostKeyCheck.__members__)
|
||||
raise ClanError(msg, description=description)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.name.lower()
|
||||
|
||||
def to_ssh_opt(self) -> list[str]:
|
||||
match self:
|
||||
case HostKeyCheck.STRICT:
|
||||
@@ -510,6 +513,11 @@ class Host:
|
||||
timeout=timeout,
|
||||
)
|
||||
|
||||
def nix_ssh_env(self) -> dict[str, str]:
|
||||
env = os.environ.copy()
|
||||
env["NIX_SSHOPTS"] = " ".join(self.ssh_cmd_opts())
|
||||
return env
|
||||
|
||||
def ssh_cmd_opts(
|
||||
self,
|
||||
verbose_ssh: bool = False,
|
||||
|
||||
Reference in New Issue
Block a user