fix(cli): force exit after render completes to prevent process hang

Node.js keeps the process alive due to lingering HTTP connections from
fetch() keep-alive pool (update checks and telemetry). The exit event
handler in cli.ts fires flushSync() which spawns a detached child
process so telemetry data is not lost.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Miguel Ángel
2026-03-27 19:14:11 -04:00
co-authored by Claude Sonnet 4.6
parent 3594374a84
commit 18c01cc0c4
+6
View File
@@ -209,6 +209,12 @@ Examples:
browserPath,
});
}
// Force exit — Node keeps the process alive due to lingering HTTP
// connections (fetch keep-alive pool from update checks / telemetry).
// The 'exit' event handler in cli.ts fires flushSync() which spawns a
// detached child process so telemetry data is not lost.
process.exit(0);
},
});