Skip to content

Commit

Permalink
flattenTree: ignore attributes that throw errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Pacman99 committed May 17, 2021
1 parent 2ebf255 commit 855dfa4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions flattenTree.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ let
op = sum: path: val:
let
pathStr = builtins.concatStringsSep "/" path;
tryCheckSet = builtins.tryEval ((builtins.typeOf val) == "set");
in
if (builtins.typeOf val) != "set" then
# ignore that value
if !tryCheckSet.value then
# ignore anything thats not a set or throws an error
# builtins.trace "${pathStr} is not of type set"
sum
else if val ? type && val.type == "derivation" then
Expand Down

0 comments on commit 855dfa4

Please sign in to comment.