Added better error handling in --flake argument

This commit is contained in:
Qubasa
2023-12-01 15:45:05 +01:00
parent f9b7c5a468
commit 3db73d3396
3 changed files with 26 additions and 1 deletions

View File

@@ -9,6 +9,9 @@ log = logging.getLogger(__name__)
def get_clan_flake_toplevel() -> Path | None:
return find_toplevel([".clan-flake", ".git", ".hg", ".svn", "flake.nix"])
def is_clan_flake(path: Path) -> bool:
return (path / ".clan-flake").exists()
def find_git_repo_root() -> Path | None:
return find_toplevel([".git"])