Mercurial > prosody-hg
comparison util/startup.lua @ 11144:2b9f7c537acb
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.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 07 Oct 2020 15:37:15 +0200 |
| parents | 2187643b8e20 |
| children | 28add4b22a74 |
comparison
equal
deleted
inserted
replaced
| 11143:818255f49297 | 11144:2b9f7c537acb |
|---|---|
| 267 -- TODO Can probably move directory creation to the install command | 267 -- TODO Can probably move directory creation to the install command |
| 268 require "lfs".mkdir(installer_plugin_path); | 268 require "lfs".mkdir(installer_plugin_path); |
| 269 require"util.paths".complement_lua_path(installer_plugin_path); | 269 require"util.paths".complement_lua_path(installer_plugin_path); |
| 270 -- luacheck: ignore 111 | 270 -- luacheck: ignore 111 |
| 271 CFG_PLUGINDIR = installer_plugin_path..path_sep..(CFG_PLUGINDIR or "plugins"); | 271 CFG_PLUGINDIR = installer_plugin_path..path_sep..(CFG_PLUGINDIR or "plugins"); |
| 272 prosody.paths.installer = installer_plugin_path; | |
| 272 prosody.paths.plugins = CFG_PLUGINDIR; | 273 prosody.paths.plugins = CFG_PLUGINDIR; |
| 273 end | 274 end |
| 274 | 275 |
| 275 function startup.chdir() | 276 function startup.chdir() |
| 276 if prosody.installed then | 277 if prosody.installed then |
