From bb3948c85772f99ab69876412e904b373841835d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 11 Oct 2020 14:27:28 +0200 Subject: core.modulemanager: Fix error if installer path missing Happens if run outside prosody. Noticed because because the storage tests fail. --- core/modulemanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/modulemanager.lua b/core/modulemanager.lua index b89c82d7..3f4233e6 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -199,7 +199,7 @@ local function do_load_module(host, module_name, state) api_instance.path = err; local custom_plugins = prosody.paths.installer; - if err:sub(1, #custom_plugins+1) == custom_plugins.."/" then + if custom_plugins and err:sub(1, #custom_plugins+1) == custom_plugins.."/" then -- Stage 1: Make it work (you are here) -- Stage 2: Make it less hacky (TODO) local manifest = {}; -- cgit v1.2.3