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 error while exiting Nightwatch using Ctrl+C. #4013

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

garg3133
Copy link
Member

@garg3133 garg3133 commented Feb 2, 2024

Right now, if we try to exit Nightwatch by pressing Ctrl+C, we get an uncaughtException error. This happens because starting with Node 16, a signal of string type (i.e. SIGINT) is emitted on pressing Ctrl+C instead of number type, but process.exit() still accepts a code of number type as the first argument.

image

This PR fixes this by always exiting the process with code 0 in case a SIGINT signal is encountered. (In Node 14 also, the process used to exit with code 0 upon pressing Ctrl+C.)

Copy link

github-actions bot commented Feb 2, 2024

Status

  • ❌ No modified files found in the types directory.
    Please make sure to include types for any changes you have made. Thank you!.

@beatfactor beatfactor merged commit 42dbafc into nightwatchjs:main Feb 2, 2024
17 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.

2 participants