Skip to content

Commit

Permalink
readPathsFromFile: fixup after #23851
Browse files Browse the repository at this point in the history
The final newline would produce an empty string;
let's filter all empty lines as well.
  • Loading branch information
vcunat committed Mar 19, 2017
1 parent 48deda9 commit 36de745
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/strings.nix
Expand Up @@ -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
Expand Down

0 comments on commit 36de745

Please sign in to comment.