Changeset

11139:2187643b8e20

util.startup: Fix startup failure if CFG_DATADIR is unset As is normal when running from source
author Kim Alvefur <zash@zash.se>
date Mon, 05 Oct 2020 21:54:17 +0200
parents 11138:2a19d61f4ae4
children 11141:a5acd6354845
files util/startup.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/startup.lua	Mon Oct 05 21:45:02 2020 +0200
+++ b/util/startup.lua	Mon Oct 05 21:54:17 2020 +0200
@@ -260,7 +260,7 @@
 end
 
 function startup.setup_plugin_install_path()
-	local installer_plugin_path = config.get("*", "installer_plugin_path") or CFG_DATADIR.."/custom_plugins";
+	local installer_plugin_path = config.get("*", "installer_plugin_path") or (CFG_DATADIR or "data").."/custom_plugins";
 	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);