Merge pull request #69746 from Infinisil/rem-opt-usage-message

lib.mkRemovedOptionModule: Show replacement for option usage too
This commit is contained in:
Silvan Mosberger
2019-10-02 23:11:41 +02:00
committed by GitHub

View File

@@ -591,6 +591,7 @@ rec {
{ options, ... }:
{ options = setAttrByPath optionName (mkOption {
visible = false;
apply = x: throw "The option `${showOption optionName}' can no longer be used since it's been removed. ${replacementInstructions}";
});
config.assertions =
let opt = getAttrFromPath optionName options; in [{