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.
This commit is contained in:
a-kenji
2024-12-17 22:29:54 +01:00
parent cedcf49483
commit 1596ecdb3d

View File

@@ -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