Merge pull request #110392 from Infinisil/rename-type

lib/modules: Set submodule type for renamed option sets
This commit is contained in:
Silvan Mosberger 2021-01-21 22:34:33 +01:00 committed by GitHub
commit 2a8591e088
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -895,7 +895,7 @@ rec {
fromOpt = getAttrFromPath from options; fromOpt = getAttrFromPath from options;
toOf = attrByPath to toOf = attrByPath to
(abort "Renaming error: option `${showOption to}' does not exist."); (abort "Renaming error: option `${showOption to}' does not exist.");
toType = let opt = attrByPath to {} options; in opt.type or null; toType = let opt = attrByPath to {} options; in opt.type or (types.submodule {});
in in
{ {
options = setAttrByPath from (mkOption { options = setAttrByPath from (mkOption {