lib.modules.doRename: Don't define warning, even as undefined, if not warning.
This fixes mkAliasOptionModule in systems with no warning option.
This commit is contained in:
parent
afddc087d9
commit
ad10d4fdef
1 changed files with 2 additions and 2 deletions
|
@ -1135,10 +1135,10 @@ rec {
|
|||
type = toType;
|
||||
});
|
||||
config = mkMerge [
|
||||
{
|
||||
(optionalAttrs (options ? warnings) {
|
||||
warnings = optional (warn && fromOpt.isDefined)
|
||||
"The option `${showOption from}' defined in ${showFiles fromOpt.files} has been renamed to `${showOption to}'.";
|
||||
}
|
||||
})
|
||||
(if withPriority
|
||||
then mkAliasAndWrapDefsWithPriority (setAttrByPath to) fromOpt
|
||||
else mkAliasAndWrapDefinitions (setAttrByPath to) fromOpt)
|
||||
|
|
Loading…
Reference in a new issue