diff options
author | Naïm Favier <n@monade.li> | 2023-03-22 11:23:21 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2023-03-22 12:37:28 +0100 |
commit | 8751764236e5d85cc394652288cda7a63fe78f94 (patch) | |
tree | ced6bd60b8deefd311e719be0171b96cd8cec844 /lib/tests | |
parent | 435d253bd67d26c9f41ccde2d16a708dcf248c9c (diff) |
lib/modules: better error for invalid option declarations
Make `byName` aware of whether it's processing options or config to give slightly more accurate error messages.
Diffstat (limited to 'lib/tests')
-rwxr-xr-x | lib/tests/modules.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 8081b186a2f9f..c1cf0a94a1b38 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -189,7 +189,7 @@ checkConfigOutput '^"foo"$' config.submodule.foo ./declare-submoduleWith-special ## shorthandOnlyDefines config behaves as expected checkConfigOutput '^true$' config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-shorthand.nix checkConfigError 'is not of type `boolean' config.submodule.config ./declare-submoduleWith-shorthand.nix ./define-submoduleWith-noshorthand.nix -checkConfigError "You're trying to declare a value of type \`bool'\n\s*rather than an attribute-set for the option" config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-shorthand.nix +checkConfigError "You're trying to define a value of type \`bool'\n\s*rather than an attribute set for the option" config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-shorthand.nix checkConfigOutput '^true$' config.submodule.config ./declare-submoduleWith-noshorthand.nix ./define-submoduleWith-noshorthand.nix ## submoduleWith should merge all modules in one swoop |