lib/modules: skip optional + ++ in evalOptionValue when no default (#510028)
This commit is contained in:
+10
-5
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user