lib/modules: inline errorContext string in applyModuleArgs

This commit is contained in:
Johannes Kirschbauer
2026-08-27 12:22:03 +02:00
parent 1ff04dd8c1
commit f01ce79aec

View File

@@ -722,10 +722,9 @@ let
# a module will resolve strictly the attributes used as argument but
# not their values. The values are forwarding the result of the
# evaluation of the option.
context = name: ''while evaluating the module argument `${name}' in "${key}":'';
extraArgs = mapAttrs (
name: _:
addErrorContext (context name) (
addErrorContext ''while evaluating the module argument `${name}' in "${key}":'' (
args.${name} or (addErrorContext
"noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
config._module.args.${name}