Skip to content

Conversation

wraithgar
Copy link
Member

@wraithgar wraithgar commented Jul 19, 2024

An erroneous assumption was that if this was explicitly set, then the exit was still intentional. This is not the case.

Closes: #7672

An erroneous assumption was that if this was explicitly set, then the exit was still intentional.  This is not the case.
@wraithgar wraithgar requested a review from a team as a code owner July 19, 2024 17:33
Copy link
Contributor

@hashtagchris hashtagchris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Left optional suggestions.

process.emit('exit', 0)
t.strictSame(logs, [])
t.strictSame(errors(), [''], 'one empty string')
t.equal(process.exitCode, 1)
Copy link
Contributor

@hashtagchris hashtagchris Jul 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: Add a dedicated test that verifies 0 is replaced by a non-zero value. The test name might make things click for someone.

Co-authored-by: Chris Sidi <hashtagchris@github.com>
@wraithgar wraithgar merged commit 4e81a6a into latest Jul 29, 2024
@wraithgar wraithgar deleted the gar/exit-handler-code branch July 29, 2024 16:40
@github-actions github-actions bot mentioned this pull request Jul 24, 2024
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.

[BUG] npm error Exit handler never called exits with status code 0
2 participants