Merge pull request #25427 from aneeshusa/fix-meta-priority-types

Fix meta priority types
This commit is contained in:
Domen Kožar
2017-05-02 09:38:32 +02:00
committed by GitHub
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -238,7 +238,7 @@ let
checkMetaAttr = k: v:
if metaTypes?${k} then
if metaTypes.${k}.check v then null else "key '${k}' has a value of an invalid type; expected ${metaTypes.${k}.description}"
if metaTypes.${k}.check v then null else "key '${k}' has a value ${v} of an invalid type ${builtins.typeOf v}; expected ${metaTypes.${k}.description}"
else "key '${k}' is unrecognized; expected one of: \n\t [${lib.concatMapStringsSep ", " (x: "'${x}'") (lib.attrNames metaTypes)}]";
checkMeta = meta: if shouldCheckMeta then lib.remove null (lib.mapAttrsToList checkMetaAttr meta) else [];