Diff

core/modulemanager.lua @ 11151:498b3ab49b9c

core.modulemanager: Fix error if installer path missing Happens if run outside prosody. Noticed because because the storage tests fail.
author Kim Alvefur <zash@zash.se>
date Sun, 11 Oct 2020 14:27:28 +0200
parent 11147:82d6c8e627b9
child 11287:b602dd3c4bbc
line wrap: on
line diff
--- a/core/modulemanager.lua	Fri Oct 09 17:41:10 2020 +0200
+++ b/core/modulemanager.lua	Sun Oct 11 14:27:28 2020 +0200
@@ -199,7 +199,7 @@
 	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 = {};