diff options
author | Silvan Mosberger <silvan.mosberger@tweag.io> | 2023-10-03 21:56:53 +0200 |
---|---|---|
committer | Silvan Mosberger <silvan.mosberger@tweag.io> | 2023-10-03 21:56:53 +0200 |
commit | d5743d926818a3e8cb43158c827d4aff409bf12c (patch) | |
tree | 18c1aff55f410be0a01028275ed65ae12a80be44 /lib/fileset | |
parent | 1c20cc23308ab8d08783c85a6405ff67dee1999d (diff) | |
download | nixpkgs-d5743d926818a3e8cb43158c827d4aff409bf12c.tar nixpkgs-d5743d926818a3e8cb43158c827d4aff409bf12c.tar.gz nixpkgs-d5743d926818a3e8cb43158c827d4aff409bf12c.tar.bz2 nixpkgs-d5743d926818a3e8cb43158c827d4aff409bf12c.tar.lz nixpkgs-d5743d926818a3e8cb43158c827d4aff409bf12c.tar.xz nixpkgs-d5743d926818a3e8cb43158c827d4aff409bf12c.tar.zst nixpkgs-d5743d926818a3e8cb43158c827d4aff409bf12c.zip |
lib.fileset.unions: Fix outdated docs
Since 4f35f003e6e5b800be75e3985054e5fce2dea50a unions supports empty lists too
Diffstat (limited to 'lib/fileset')
-rw-r--r-- | lib/fileset/default.nix | 1 | ||||
-rwxr-xr-x | lib/fileset/tests.sh | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/fileset/default.nix b/lib/fileset/default.nix index ab26112c947..f7d957bd264 100644 --- a/lib/fileset/default.nix +++ b/lib/fileset/default.nix @@ -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: diff --git a/lib/fileset/tests.sh b/lib/fileset/tests.sh index 525b8aaa917..7fdbb3ede04 100755 --- a/lib/fileset/tests.sh +++ b/lib/fileset/tests.sh @@ -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 |