clan machines list: reduce noise

Don't log nix error output by default on `clan machines list`.
Log it, if `--debug` is passed.

Fixes #1115
This commit is contained in:
a-kenji
2024-05-24 10:56:41 +02:00
parent 0290a0e726
commit 5d0a0762b3
2 changed files with 12 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ def inspect_flake(flake_url: str | Path, machine_name: str) -> FlakeConfig:
system = config["system"]
# Check if the machine exists
machines = list_machines(flake_url)
machines = list_machines(False, flake_url)
if machine_name not in machines:
raise ClanError(
f"Machine {machine_name} not found in {flake_url}. Available machines: {', '.join(machines)}"