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
commit 2b1e2f2e97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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