Skip to content

Commit

Permalink
Merge pull request NixOS#258855 from tweag/fileset.doc-fix
Browse files Browse the repository at this point in the history
`lib.fileset.unions`: Fix outdated docs
  • Loading branch information
infinisil authored Oct 3, 2023
2 parents 7288844 + d5743d9 commit 81e8f48
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/fileset/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ If a directory does not recursively contain any file, it is omitted from the sto
*/
unions =
# A list of file sets.
# Must contain at least 1 element.
# The elements can also be paths,
# which get [implicitly coerced to file sets](#sec-fileset-path-coercion).
filesets:
Expand Down
2 changes: 1 addition & 1 deletion lib/fileset/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ expectFailure 'toSource { root = ./.; fileset = union ./. ./b; }' 'lib.fileset.u
expectFailure 'toSource { root = ./.; fileset = unions [ ./a ./. ]; }' 'lib.fileset.unions: element 0 \('"$work"'/a\) does not exist.'
expectFailure 'toSource { root = ./.; fileset = unions [ ./. ./b ]; }' 'lib.fileset.unions: element 1 \('"$work"'/b\) does not exist.'

# unions needs a list with at least 1 element
# unions needs a list
expectFailure 'toSource { root = ./.; fileset = unions null; }' 'lib.fileset.unions: Expected argument to be a list, but got a null.'

# The tree of later arguments should not be evaluated if a former argument already includes all files
Expand Down

0 comments on commit 81e8f48

Please sign in to comment.