diff --git a/src/lib/utils.ts b/src/lib/utils.ts index e86aaac..572550c 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -484,6 +484,11 @@ export function setupSignalHandlers(cleanup: () => Promise) { // Keep the process alive process.stdin.resume() + process.stdin.on('end', async () => { + log('\nShutting down...') + await cleanup() + process.exit(0) + }) } /**