util.startup: Save the path used by the installer to prosody.paths
authorKim Alvefur <zash@zash.se>
Wed, 07 Oct 2020 15:37:15 +0200
changeset 11148 2b9f7c537acb
parent 11147 818255f49297
child 11149 be73df6765b9
util.startup: Save the path used by the installer to prosody.paths Makes it easier for other parts of the code to use this for things, such as determining whether a certain module is from this path or from elsewhere.
util/startup.lua
--- a/util/startup.lua	Wed Oct 07 13:36:24 2020 +0200
+++ b/util/startup.lua	Wed Oct 07 15:37:15 2020 +0200
@@ -269,6 +269,7 @@
 	require"util.paths".complement_lua_path(installer_plugin_path);
 	-- luacheck: ignore 111
 	CFG_PLUGINDIR = installer_plugin_path..path_sep..(CFG_PLUGINDIR or "plugins");
+	prosody.paths.installer = installer_plugin_path;
 	prosody.paths.plugins = CFG_PLUGINDIR;
 end