Skip to content

fix: use exit code#43

Merged
molisani merged 1 commit intobloomberg:mainfrom
murtyjones:mj/exit-code
Jan 6, 2025
Merged

fix: use exit code#43
molisani merged 1 commit intobloomberg:mainfrom
murtyjones:mj/exit-code

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 <mjones721@bloomberg.net>
@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