question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v2] can't exit on error with ^C if exitOnCtrlC: false

See original GitHub issue

Hi 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!

  1. git clone https://github.com/npm/libpickupdates
  2. cd libpickupdates && git checkout zkat/exit-on-error
  3. npm run build
  4. node index.js
  5. 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:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
vadimdemedescommented, Feb 19, 2019

Hm interesting, I’m at work now, but will investigate in about 5 hours.

0reactions
vadimdemedescommented, Feb 20, 2019

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found