From 9526273a1bc133a4f34f9caec30a7f5583619547 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 27 Dec 2017 00:42:57 +0100 Subject: moduleapi: Warn if a module being loaded as a dependency has been disabled --- core/moduleapi.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core') diff --git a/core/moduleapi.lua b/core/moduleapi.lua index e39fd026..2eae35fc 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -161,6 +161,9 @@ function api:depends(name) end end); end + if self:get_option_inherited_set("modules_disabled", {}):contains(name) then + self:log("warn", "Loading prerequisite mod_%s despite it being disabled", name); + end local mod = modulemanager.get_module(self.host, name) or modulemanager.get_module("*", name); if mod and mod.module.host == "*" and self.host ~= "*" and modulemanager.module_has_method(mod, "add_host") then -- cgit v1.2.3