replace all instances of die() with print+exit because die() returns exit code 0

This commit is contained in:
Andrew Dolgov
2025-07-04 13:31:15 +03:00
parent b0dc82dc7e
commit ec0a19c5a6
3 changed files with 18 additions and 9 deletions

View File

@@ -141,7 +141,8 @@
}
if (!isset($options['update-schema']) && Config::is_migration_needed()) {
die("Schema version is wrong, please upgrade the database (--update-schema).\n");
print("Schema version is wrong, please upgrade the database (--update-schema).\n");
exit(1);
}
Debug::set_enabled(true);
@@ -188,8 +189,9 @@
// Try to lock a file in order to avoid concurrent update.
if (!$lock_handle) {
die("error: Can't create lockfile ($lock_filename). ".
print("error: Can't create lockfile ($lock_filename). ".
"Maybe another update process is already running.\n");
exit(1);
}
if (isset($options["force-update"])) {