lib.readPathsFromFile: simplify, /cc #24036
This part isn't needed after 36de745e1b
.
This commit is contained in:
parent
64a880faa6
commit
02126b69e5
|
@ -476,9 +476,7 @@ rec {
|
|||
readPathsFromFile = rootPath: file:
|
||||
let
|
||||
root = toString rootPath;
|
||||
lines =
|
||||
builtins.map (lib.removeSuffix "\n")
|
||||
(lib.splitString "\n" (builtins.readFile file));
|
||||
lines = lib.splitString "\n" (builtins.readFile file);
|
||||
removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line));
|
||||
relativePaths = removeComments lines;
|
||||
absolutePaths = builtins.map (path: builtins.toPath (root + "/" + path)) relativePaths;
|
||||
|
|
Loading…
Reference in New Issue