Merge pull request #62712 from danbst/module-conflict-naming

NixOS module system: improve one of error messages
This commit is contained in:
Danylo Hlynskyi
2019-06-13 11:59:54 +03:00
committed by GitHub
2 changed files with 19 additions and 15 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ rec {
mergeOneOption = loc: defs:
if defs == [] then abort "This case should never happen."
else if length defs != 1 then
throw "The unique option `${showOption loc}' is defined multiple times, in ${showFiles (getFiles defs)}."
throw "The unique option `${showOption loc}' is defined multiple times, in:\n - ${concatStringsSep "\n - " (getFiles defs)}."
else (head defs).value;
/* "Merge" option definitions by checking that they all have the same value. */