get_clan_flake_toplevel: fix check

This commit is contained in:
Jörg Thalheim
2023-07-28 12:35:41 +02:00
parent 774d1d1219
commit 88a2c2656a
2 changed files with 9 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ def get_clan_flake_toplevel() -> Path:
for project_file in [".clan-flake", ".git", ".hg", ".svn", "flake.nix"]:
initial_path = Path(os.getcwd())
path = Path(initial_path)
while path.parent == path:
while path.parent != path:
if (path / project_file).exists():
return path
path = path.parent