Fix process exit: use process.exit() directly instead of logStream.end callback

logStream.end() callback wasn't firing reliably, leaving processes hanging.
process.exit() is synchronous and forces exit regardless of open handles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 12:21:55 -08:00
parent d43e2025b2
commit 4419363b3c
3 changed files with 6 additions and 6 deletions

View File

@@ -249,9 +249,9 @@ async function main() {
}
main().then(() => {
logStream.end(() => process.exit(0));
process.exit(0);
}).catch(e => {
console.error('Fatal:', e.message);
if (e.stack) console.error(e.stack);
logStream.end(() => process.exit(1));
process.exit(1);
});