diff options
author | Kim Alvefur <zash@zash.se> | 2021-01-24 15:57:48 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-01-24 15:57:48 +0100 |
commit | 27c7ee73b702c60c4496c5507dbc581b9a13a7bf (patch) | |
tree | 0a17c5364d83ccc006726ec1a4e59bab4944f7f7 | |
parent | 4825d991dc38b068259b53365bcb922e7091679a (diff) | |
download | prosody-27c7ee73b702c60c4496c5507dbc581b9a13a7bf.tar.gz prosody-27c7ee73b702c60c4496c5507dbc581b9a13a7bf.zip |
util.startup: Don't create installer plugin path (as root)
Since this runs before dropping root, the directory ends up being owned
by root, resulting in luarocks failing to install anything, since by
then it would be running as the prosody user.
luarocks creates this directory if needed, so creating it during startup
is not necessary.
One potential issue is if the directory is somewhere where Prosody can't
write, but then you will simply have to create it yourself with the
appropriate permissions.
-rw-r--r-- | util/startup.lua | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/util/startup.lua b/util/startup.lua index 27420c57..d6e7eca1 100644 --- a/util/startup.lua +++ b/util/startup.lua @@ -271,8 +271,6 @@ function startup.setup_plugin_install_path() local path_sep = package.config:sub(3,3); -- TODO Figure out what this should be relative to, because CWD could be anywhere installer_plugin_path = config.resolve_relative_path(require "lfs".currentdir(), installer_plugin_path); - -- TODO Can probably move directory creation to the install command - require "lfs".mkdir(installer_plugin_path); require"util.paths".complement_lua_path(installer_plugin_path); -- luacheck: ignore 111 CFG_PLUGINDIR = installer_plugin_path..path_sep..(CFG_PLUGINDIR or "plugins"); |