inline find_git_repo_root

This commit is contained in:
Jörg Thalheim
2025-07-29 14:52:39 +02:00
parent 0908a2efb8
commit bd6f7b03af
2 changed files with 2 additions and 4 deletions

View File

@@ -32,8 +32,6 @@ def get_clan_flake_toplevel() -> Path | None:
return find_toplevel([".clan-flake", ".git", ".hg", ".svn", "flake.nix"])
def find_git_repo_root() -> Path | None:
return find_toplevel([".git"])
def clan_key_safe(flake_url: str) -> str:

View File

@@ -12,7 +12,7 @@ from tempfile import NamedTemporaryFile
from typing import Any, override
from clan_cli.vars.generate import generate_vars
from clan_lib.dirs import find_git_repo_root
from clan_lib.dirs import find_toplevel
from clan_lib.flake.flake import Flake
from clan_lib.machines.machines import Machine
from clan_lib.nix import nix_config, nix_eval, nix_test_store
@@ -139,7 +139,7 @@ def parse_args() -> Options:
i.e. 'nix eval <repo_root>#checks ...'
""",
required=False,
default=os.environ.get("PRJ_ROOT", find_git_repo_root()),
default=os.environ.get("PRJ_ROOT", find_toplevel([".git"])),
)
parser.add_argument(
"--clean",