From a7fec487f855cad8adc9bceb68d74c508aa55adc Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sun, 1 Mar 2020 08:45:52 +0000 Subject: [PATCH] Prevent infinite recursion in gitignore filter construction --- lib.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.nix b/lib.nix index f9a62a2..b816feb 100644 --- a/lib.nix +++ b/lib.nix @@ -104,7 +104,7 @@ let hasGitIgnore = builtins.pathExists gitIgnore; gitIgnores = if hasGitIgnore then [ gitIgnore ] else []; in - lib.optionals (! isGitRoot) (findGitIgnores parent) ++ gitIgnores; + lib.optionals (builtins.toString path != "/" && ! isGitRoot) (findGitIgnores parent) ++ gitIgnores; /* Provides a source filtering mechanism that: