readPathsFromFile: fixup after #23851

The final newline would produce an empty string;
let's filter all empty lines as well.
This commit is contained in:
Vladimír Čunát 2017-03-19 10:16:44 +01:00
parent 48deda9f36
commit 36de745e1b
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -479,7 +479,7 @@ rec {
lines =
builtins.map (lib.removeSuffix "\n")
(lib.splitString "\n" (builtins.readFile file));
removeComments = lib.filter (line: !(lib.hasPrefix "#" line));
removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line));
relativePaths = removeComments lines;
absolutePaths = builtins.map (path: builtins.toPath (root + "/" + path)) relativePaths;
in