1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

types: explicitly state unique options are expected to be unique

This commit is contained in:
Domen Kožar 2023-02-09 07:25:50 +00:00
parent 5e6ed1c0c7
commit b3cc29c288

View file

@ -184,7 +184,7 @@ rec {
if length defs == 1 if length defs == 1
then (head defs).value then (head defs).value
else assert length defs > 1; else assert length defs > 1;
throw "The option `${showOption loc}' is defined multiple times.\n${message}\nDefinition values:${showDefs defs}"; throw "The option `${showOption loc}' is defined multiple times while it's expected to be unique.\n${message}\nDefinition values:${showDefs defs}";
/* "Merge" option definitions by checking that they all have the same value. */ /* "Merge" option definitions by checking that they all have the same value. */
mergeEqualOption = loc: defs: mergeEqualOption = loc: defs: