Enhance unattended CLI to log fatal error just like setup wizardinstead of silent failure

This commit is contained in:
odain
2026-06-17 15:12:46 +02:00
parent d4d6fa149d
commit 75433d3390

View File

@@ -3,6 +3,17 @@
require_once(dirname(__FILE__, 3).'/approot.inc.php');
require_once(__DIR__.'/InstallationFileService.php');
function fatalHandler()
{
$error = error_get_last();
if ($error) {
SetupLog::Error("Fatal error during setup", null, $error);
echo "Fatal Error occured: {$error["message"]}";
}
}
register_shutdown_function("fatalHandler");
function PrintUsageAndExit()
{
echo <<<EOF