fix(readTree): Apply .skip-subtree to Nix-file children as well
This behaviour was previously confusing, since readTree's data structure treats children from Nix files and directories as identical but only one of them would be affected by .skip-subtree The "subtree" to be skipped here refers to all children of the structure. Change-Id: Idf596c9823f09cc2acf49523916bde4b801b8519
This commit is contained in:
parent
14bf3f3cd9
commit
2fa157ccd6
1 changed files with 2 additions and 1 deletions
|
@ -100,7 +100,8 @@ let
|
||||||
}) (filter filterDir (attrNames dir));
|
}) (filter filterDir (attrNames dir));
|
||||||
|
|
||||||
# Import Nix files
|
# Import Nix files
|
||||||
nixFiles = filter (f: f != null) (map nixFileName (attrNames dir));
|
nixFiles = if hasAttr ".skip-subtree" dir then []
|
||||||
|
else filter (f: f != null) (map nixFileName (attrNames dir));
|
||||||
nixChildren = map (c: let
|
nixChildren = map (c: let
|
||||||
p = joinChild (c + ".nix");
|
p = joinChild (c + ".nix");
|
||||||
childParts = parts ++ [ c ];
|
childParts = parts ++ [ c ];
|
||||||
|
|
Loading…
Reference in a new issue