lib/modules: skip optional + ++ in evalOptionValue when no default (#510028)

This commit is contained in:
Ben Siraphob
2026-04-14 17:42:41 +00:00
committed by GitHub
+10 -5
View File
@@ -1121,11 +1121,16 @@ let
let
# Add in the default value for this option, if any.
defs' =
(optional (opt ? default) {
file = head opt.declarations;
value = mkOptionDefault opt.default;
})
++ defs;
if opt ? default then
[
{
file = head opt.declarations;
value = mkOptionDefault opt.default;
}
]
++ defs
else
defs;
# Handle properties, check types, and merge everything together.
res =