()
| 649 | } |
| 650 | |
| 651 | async function main() { |
| 652 | await ensureBinaryExists() |
| 653 | |
| 654 | const child = spawnInstalledBinary() |
| 655 | |
| 656 | const exitListener = (code, signal) => { |
| 657 | resetTerminal({ |
| 658 | exitAlternateScreen: shouldExitAlternateScreen(code, signal), |
| 659 | }) |
| 660 | printCrashDiagnostics(code, signal) |
| 661 | process.exit(signal ? 1 : (code || 0)) |
| 662 | } |
| 663 | |
| 664 | child.on('exit', exitListener) |
| 665 | |
| 666 | setTimeout(() => { |
| 667 | checkForUpdates(child, exitListener) |
| 668 | }, 100) |
| 669 | } |
| 670 | |
| 671 | main().catch((error) => { |
| 672 | console.error('❌ Unexpected error:', error.message) |
no test coverage detected