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:
Jesse Wierzbinski 2024-06-13 23:44:46 -10:00
parent 7ba0eb82f1
commit c764cc044d
No known key found for this signature in database
4 changed files with 24 additions and 7 deletions

View file

@ -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();
}