mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix: 🚑 Sleep process instead of exiting it on error
Avoids Docker's auto-restart policy from causing infinite reboots and hanging the system
This commit is contained in:
parent
7ba0eb82f1
commit
c764cc044d
4 changed files with 24 additions and 7 deletions
|
|
@ -24,6 +24,8 @@ const parsed = await configValidator.safeParseAsync(config);
|
|||
if (!parsed.success) {
|
||||
console.error("Invalid config file:");
|
||||
console.error(fromZodError(parsed.error).message);
|
||||
// Hang until Ctrl+C is pressed
|
||||
await Bun.sleep(Number.POSITIVE_INFINITY);
|
||||
process.exit();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue