From 82d8f82544667b76c6c9e512fa4ce393fbe6b9ad Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Sat, 9 Mar 2024 18:17:39 +0100 Subject: [PATCH] fix(findGitIgnores): Infinite recursion if .git directory doesn't exist --- lib.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.nix b/lib.nix index 6bd31c4..770c813 100644 --- a/lib.nix +++ b/lib.nix @@ -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;