Comparison

util/startup.lua @ 11866:515a89dee6ae

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)
author Kim Alvefur <zash@zash.se>
date Sat, 23 Oct 2021 22:24:59 +0200
parent 11847:2b3ce80ffece
child 11869:d52a73425eba
comparison
equal deleted inserted replaced
11865:77bbbd4263d7 11866:515a89dee6ae
485 end 485 end
486 end 486 end
487 if not prosody.switched_user then 487 if not prosody.switched_user then
488 -- Boo! 488 -- Boo!
489 print("Warning: Couldn't switch to Prosody user/group '"..tostring(desired_user).."'/'"..tostring(desired_group).."': "..tostring(err)); 489 print("Warning: Couldn't switch to Prosody user/group '"..tostring(desired_user).."'/'"..tostring(desired_group).."': "..tostring(err));
490 else 490 elseif prosody.config_file then
491 -- Make sure the Prosody user can read the config 491 -- Make sure the Prosody user can read the config
492 local conf, err, errno = io.open(prosody.config_file); --luacheck: ignore 211/errno 492 local conf, err, errno = io.open(prosody.config_file); --luacheck: ignore 211/errno
493 if conf then 493 if conf then
494 conf:close(); 494 conf:close();
495 else 495 else