stdenv/generic/check-meta: fix error message evaluation
This commit is contained in:
parent
7e6068c353
commit
8ae51ff9c1
@ -162,7 +162,7 @@ let
|
|||||||
|
|
||||||
checkMetaAttr = k: v:
|
checkMetaAttr = k: v:
|
||||||
if metaTypes?${k} then
|
if metaTypes?${k} then
|
||||||
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}"
|
if metaTypes.${k}.check v then null else "key '${k}' has a value ${toString 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)}]";
|
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 [];
|
checkMeta = meta: if shouldCheckMeta then lib.remove null (lib.mapAttrsToList checkMetaAttr meta) else [];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user