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
Don't reject with standard error on exit signal #1368
Comments
2 tasks
mondeja
changed the title
Don't reject with standard error on signal exit
Don't reject with standard error on exit signal
Mar 9, 2024
SBoudrias
added a commit
that referenced
this issue
Mar 9, 2024
Hey, that's a good call out! Thanks for raising the issue. I've made a first draft PR to address that issue. It'd be great if you could review the code and make sure that would work for you! |
SBoudrias
added a commit
that referenced
this issue
Mar 12, 2024
Latest versions include the changes! Thanks again |
Great. Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to handle a SIGINT signal (tipically pressing
Ctrl^C
) on a script but this raises a standard error:Inquirer.js/packages/core/src/lib/create-prompt.mts
Line 39 in c91196e
I would like to catch a custom error instead. I know that I can use something like checking the error message, but that sounds like crazy to me, because it could lead to catch other errors or break if another released version changes this message.
Please, could you throw a custom error that I could be able to properly catch to exit when SIGINT is received?
The text was updated successfully, but these errors were encountered: