Comparison

util/startup.lua @ 10195:3409f746f978

util.startup: Directly calling lfs.currentdir instead of storing it in a local variable
author João Duarte <jvsDuarte08@gmail.com>
date Thu, 01 Aug 2019 08:08:06 -0700
parent 10194:dad1bc5fdb8e
child 10196:5e1012f2f2b7
comparison
equal deleted inserted replaced
10194:dad1bc5fdb8e 10195:3409f746f978
234 -- path1;path2;path3;defaultpath... 234 -- path1;path2;path3;defaultpath...
235 -- luacheck: ignore 111 235 -- luacheck: ignore 111
236 CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); 236 CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins");
237 prosody.paths.plugins = CFG_PLUGINDIR; 237 prosody.paths.plugins = CFG_PLUGINDIR;
238 end 238 end
239 local current_directory = require "lfs".currentdir(); 239 installer_plugin_path = config.resolve_relative_path(require "lfs".currentdir(), installer_plugin_path);
240 installer_plugin_path = config.resolve_relative_path(current_directory, installer_plugin_path);
241 require "lfs".mkdir(installer_plugin_path) 240 require "lfs".mkdir(installer_plugin_path)
242 -- Checking for duplicates 241 -- Checking for duplicates
243 -- The commands using luarocks need the path to the directory that has the /share and /lib folders. 242 -- The commands using luarocks need the path to the directory that has the /share and /lib folders.
244 if not string.match(package.path, installer_plugin_path) then 243 if not string.match(package.path, installer_plugin_path) then
245 local lua_version = _VERSION:match(" (.+)$") 244 local lua_version = _VERSION:match(" (.+)$")