From 1596ecdb3d20079db5bf2b96b4c00b7d35e56000 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Tue, 17 Dec 2024 22:29:54 +0100 Subject: [PATCH] pkgs/cli: Fix `target_host` for `machines install` Use the correct `target_host`, if a user is defined. Before the change: ```console $ clan machines install $ Install jon to 49.13.232.197? [y/N] ``` After the change: ```console $ clan machines install $ Install jon to root@49.13.232.197? [y/N] ``` Because root is the configured user for `target_host`, this is the correct behavior. --- pkgs/clan-cli/clan_cli/machines/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/clan-cli/clan_cli/machines/install.py b/pkgs/clan-cli/clan_cli/machines/install.py index d8075bdb4..16c98f7a0 100644 --- a/pkgs/clan-cli/clan_cli/machines/install.py +++ b/pkgs/clan-cli/clan_cli/machines/install.py @@ -149,7 +149,7 @@ def install_command(args: argparse.Namespace) -> None: machine = Machine( name=args.machine, flake=args.flake, nix_options=args.option ) - target_host = machine.target_host.host + target_host = machine.target_host.target if deploy_info: password = deploy_info.pwd