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 exit code when no signal caught #4

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

73rhodes
Copy link
Collaborator

This PR addresses comments on mochajs#4989 by fixing the exit code in the following scenario:

  • if "--posix-exit-codes" is specified in the command-line options:
    • if no signal is caught
      • exit with code 0
    • otherwise exit with 128 + numerical signal

The PR also adds test coverage to assert that the original behavior of exiting with the number of failed tests continues to work the same way when "--posix-exit-codes" is not specified in the command line options.

Copy link

@SophiaRoland SophiaRoland left a comment

Choose a reason for hiding this comment

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

LGTM!

@73rhodes 73rhodes merged commit 3438da6 into master Apr 11, 2024
1 check passed
@73rhodes 73rhodes deleted the dderidder/X-mochajs-pr-review-part2 branch July 8, 2024 08:37
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.

3 participants