Comparison

util/startup.lua @ 10405:e7f5735f19e1

util.startup: Disable plugin installer path creation for now (see comments)
author Kim Alvefur <zash@zash.se>
date Sat, 09 Nov 2019 00:26:56 +0100
parent 10404:29c10930a7b2
child 10532:19ec384eb782
comparison
equal deleted inserted replaced
10404:29c10930a7b2 10405:e7f5735f19e1
238 end 238 end
239 239
240 function startup.setup_plugin_install_path() 240 function startup.setup_plugin_install_path()
241 local installer_plugin_path = config.get("*", "installer_plugin_path") or "custom_plugins"; 241 local installer_plugin_path = config.get("*", "installer_plugin_path") or "custom_plugins";
242 local path_sep = package.config:sub(3,3); 242 local path_sep = package.config:sub(3,3);
243 -- TODO Figure out what this should be relative to, because CWD could be anywhere
243 installer_plugin_path = config.resolve_relative_path(require "lfs".currentdir(), installer_plugin_path); 244 installer_plugin_path = config.resolve_relative_path(require "lfs".currentdir(), installer_plugin_path);
245 -- TODO Can probably move directory creation to the install command
244 require "lfs".mkdir(installer_plugin_path); 246 require "lfs".mkdir(installer_plugin_path);
245 require"util.paths".complement_lua_path(installer_plugin_path); 247 require"util.paths".complement_lua_path(installer_plugin_path);
246 -- luacheck: ignore 111 248 -- luacheck: ignore 111
247 CFG_PLUGINDIR = installer_plugin_path..path_sep..(CFG_PLUGINDIR or "plugins"); 249 CFG_PLUGINDIR = installer_plugin_path..path_sep..(CFG_PLUGINDIR or "plugins");
248 prosody.paths.plugins = CFG_PLUGINDIR; 250 prosody.paths.plugins = CFG_PLUGINDIR;
537 startup.init_global_state(); 539 startup.init_global_state();
538 startup.read_config(); 540 startup.read_config();
539 startup.force_console_logging(); 541 startup.force_console_logging();
540 startup.init_logging(); 542 startup.init_logging();
541 startup.setup_plugindir(); 543 startup.setup_plugindir();
542 startup.setup_plugin_install_path(); 544 -- startup.setup_plugin_install_path();
543 startup.setup_datadir(); 545 startup.setup_datadir();
544 startup.chdir(); 546 startup.chdir();
545 startup.read_version(); 547 startup.read_version();
546 startup.switch_user(); 548 startup.switch_user();
547 startup.check_dependencies(); 549 startup.check_dependencies();
563 startup.set_function_metatable(); 565 startup.set_function_metatable();
564 startup.check_dependencies(); 566 startup.check_dependencies();
565 startup.init_logging(); 567 startup.init_logging();
566 startup.load_libraries(); 568 startup.load_libraries();
567 startup.setup_plugindir(); 569 startup.setup_plugindir();
568 startup.setup_plugin_install_path(); 570 -- startup.setup_plugin_install_path();
569 startup.setup_datadir(); 571 startup.setup_datadir();
570 startup.chdir(); 572 startup.chdir();
571 startup.add_global_prosody_functions(); 573 startup.add_global_prosody_functions();
572 startup.read_version(); 574 startup.read_version();
573 startup.log_greeting(); 575 startup.log_greeting();