fix(findGitIgnores): Infinite recursion if .git directory doesn't exist

This commit is contained in:
TSR Berry 2024-03-09 18:17:39 +01:00
parent 3c92540611
commit 82d8f82544
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2

View file

@ -52,7 +52,7 @@ let
# Find gitignore files recursively in parent directory stopping with .git
findGitIgnores = path:
let
parent = path + "/..";
parent = builtins.dirOf path;
gitIgnore = path + "/.gitignore";
isGitRoot = builtins.pathExists (path + "/.git");
hasGitIgnore = builtins.pathExists gitIgnore;