From c5de2a9d22f1bd14eb56c2fb0e5bfc09b3451538 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 23 Oct 2021 22:24:59 +0200 Subject: util.startup: Skip config readability check in migrator (thanks eTaurus) This field is empty for reasons when invoked by prosody-migrator, which threw an error: > bad argument #1 to 'open' (string expected, got nil) --- util/startup.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/startup.lua b/util/startup.lua index 5e3bba7b..b4dc6095 100644 --- a/util/startup.lua +++ b/util/startup.lua @@ -487,7 +487,7 @@ function startup.switch_user() if not prosody.switched_user then -- Boo! print("Warning: Couldn't switch to Prosody user/group '"..tostring(desired_user).."'/'"..tostring(desired_group).."': "..tostring(err)); - else + elseif prosody.config_file then -- Make sure the Prosody user can read the config local conf, err, errno = io.open(prosody.config_file); --luacheck: ignore 211/errno if conf then -- cgit v1.2.3