clan-cli: Fix incorrect input handling in get_templates

This commit is contained in:
Qubasa
2025-02-04 14:28:56 +07:00
committed by clan-bot
parent da0f792d9e
commit bf26a2d306
3 changed files with 13 additions and 3 deletions

View File

@@ -113,9 +113,10 @@ def register_create_parser(parser: argparse.ArgumentParser) -> None:
type=str,
help="""Flake input name to use as template source
can be specified multiple times, inputs are tried in order of definition
Example: --input clan --input clan-core
""",
action="append",
default=["clan-core"],
default=[],
)
parser.add_argument(
@@ -147,6 +148,9 @@ def register_create_parser(parser: argparse.ArgumentParser) -> None:
)
def create_flake_command(args: argparse.Namespace) -> None:
if len(args.input) == 0:
args.input = ["clan", "clan-core"]
if args.no_self:
input_prio = InputPrio.try_inputs(tuple(args.input))
else: