Fix infinite recusion in the case where no gitignores are found

This commit is contained in:
adisbladis 2022-04-14 16:19:59 +12:00
parent 1daf54da67
commit 5e667bc527

View file

@ -180,7 +180,7 @@ let
hasGitIgnore = builtins.pathExists gitIgnore;
gitIgnores = if hasGitIgnore then [ gitIgnore ] else [ ];
in
lib.optionals (builtins.pathExists path && ! isGitRoot) (findGitIgnores parent) ++ gitIgnores;
lib.optionals (builtins.pathExists path && builtins.toString path != "/" && ! isGitRoot) (findGitIgnores parent) ++ gitIgnores;
/*
Provides a source filtering mechanism that: