From a8fa8f505c4847efa36bdc5ccf5da2fb1bc03036 Mon Sep 17 00:00:00 2001 From: Qubasa Date: Mon, 10 Feb 2025 12:38:29 +0700 Subject: [PATCH] clan-cli: Add update_clan boolean option to create_clan --- pkgs/clan-cli/clan_cli/clan/create.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/clan-cli/clan_cli/clan/create.py b/pkgs/clan-cli/clan_cli/clan/create.py index bdec765b2..5dcfce84d 100644 --- a/pkgs/clan-cli/clan_cli/clan/create.py +++ b/pkgs/clan-cli/clan_cli/clan/create.py @@ -37,6 +37,7 @@ class CreateOptions: input_prio: InputPrio | None = None setup_git: bool = True initial: Inventory | None = None + update_clan: bool = True def git_command(directory: Path, *args: str) -> list[str]: @@ -96,10 +97,11 @@ def create_clan(opts: CreateOptions) -> CreateClanResponse: git_command(dest, "config", "user.email", "clan@example.com") ) - flake_update = run( - nix_shell(["nixpkgs#nix"], ["nix", "flake", "update"]), RunOpts(cwd=dest) - ) - response.flake_update = flake_update + if opts.update_clan: + flake_update = run( + nix_shell(["nixpkgs#nix"], ["nix", "flake", "update"]), RunOpts(cwd=dest) + ) + response.flake_update = flake_update if opts.initial: init_inventory(str(opts.dest), init=opts.initial)