From 36de745e1b705644d22b0d7f8fc60fdedb49d2d3 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sun, 19 Mar 2017 10:16:44 +0100 Subject: readPathsFromFile: fixup after #23851 The final newline would produce an empty string; let's filter all empty lines as well. --- lib/strings.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/strings.nix') diff --git a/lib/strings.nix b/lib/strings.nix index eb3c2971ad5..44b6f8780c8 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -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 -- cgit 1.4.1