(reason: unknown)
| 171 | emergencyExit(1); |
| 172 | }; |
| 173 | const onUnhandledRejection = (reason: unknown): void => { |
| 174 | try { |
| 175 | log.error('unhandledRejection, restoring terminal and exiting', { reason: String(reason) }); |
| 176 | } catch { |
| 177 | /* ignore */ |
| 178 | } |
| 179 | emergencyExit(1); |
| 180 | }; |
| 181 | process.on('uncaughtException', onUncaughtException); |
| 182 | process.on('unhandledRejection', onUnhandledRejection); |
| 183 | // Remove the crash handlers once the TUI exits cleanly so repeated runShell() |
nothing calls this directly
no test coverage detected