[v2] can't exit on error with ^C if exitOnCtrlC: false
See original GitHub issueHi again! I’m trying out the new patches in 2.0.0-15
and found out that my custom ^C
handler, which just does app.unmount()
, isn’t able to unmount the app if an error happens – in fact, there’s no way to exit at all!
git clone https://github.com/npm/libpickupdates
cd libpickupdates && git checkout zkat/exit-on-error
npm run build
node index.js
- Try to get out without forcibly closing your terminal.
There’s also a probably-the-same bug in latest
, where ^C
doesn’t seem to work at all. Any clues?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Automatic exit from Bash shell script on error - Stack Overflow
The shell does not exit if the command that fails is part of the command list immediately following a while or until keyword,...
Read more >How to Exit When Errors Occur in Bash Scripts - Intoli
A short guide to exiting when errors occur in your bash scripts. ... "ls --fake-option" command filed with exit code 2.
Read more >How to exit a shell script if one part of it fails?
-e Exit immediately if a command exits with a non-zero status. So if any of your commands fail, the script will exit.
Read more >Bash command line exit codes demystified | Enable Sysadmin
When you execute a command or run a script, you receive an exit code. An exit code is a system response that reports...
Read more >Returning information from a shell script via an Exit Code
Buy this Shell Scripting Tutorial as a PDF for only $5. Exit Codes. Exit codes are a number between 0 and 255, which...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hm interesting, I’m at work now, but will investigate in about 5 hours.
I’ve also added tests to ensure processes using Ink always exit cleanly, without
process.exit()
, see https://github.com/vadimdemedes/ink/commit/3d477dbc0e35f47bb497ef72c1650b3cfaf9f625.Released
2.0.0-16
, which should fix this issue!