Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use exit code #43

Merged
merged 1 commit into from
Jan 6, 2025
Merged

fix: use exit code #43

merged 1 commit into from
Jan 6, 2025

Conversation

murtyjones
Copy link

@murtyjones murtyjones commented Dec 19, 2024

Resolves #44

swiches to setting exitCode rather than calling exit(), per the node guidance:

The reason this is problematic is because writes to process.stdout in Node.js are sometimes asynchronous and may occur over multiple ticks of the Node.js event loop. Calling process.exit(), however, forces the process to exit before those additional writes to stdout can be performed.

Rather than calling process.exit() directly, the code should set the process.exitCode and allow the process to exit naturally by avoiding scheduling any additional work for the event loop

Signed-off-by: Marty Jones <[email protected]>
@molisani molisani merged commit 3ac7278 into bloomberg:main Jan 6, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't run CLI with stricli with bun --watch, it exits process
2 participants