212: lib/pathsIn: don't error if path doesn't exist r=Pacman99 a=Pacman99

Really simple, just don't error if path passed to pathsIn doesn't exist. This doesn't affect much, since the majority of folders in devos end up getting referenced in some way or another outside of a pathsIn call. But it will  help for users of mkDevos, so they can safely delete folders they don't want to use. 
Can test with current overlays folder in deovs, that only gets imported through a pathsIn call.

Co-authored-by: Pacman99 <pachum99@gmail.com>
This commit is contained in:
bors[bot] 2021-03-25 23:01:35 +00:00 committed by GitHub
commit d5c5ff5a70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,5 +4,6 @@
let
fullPath = name: "${toString dir}/${name}";
in
map fullPath (lib.attrNames (builtins.readDir dir));
map fullPath (lib.attrNames (lib.optionalAttrs
(builtins.pathExists dir) (builtins.readDir dir)));
}