()
| 636 | } |
| 637 | |
| 638 | async function main() { |
| 639 | await ensureBinaryExists() |
| 640 | |
| 641 | const child = spawnInstalledBinary() |
| 642 | |
| 643 | const exitListener = (code, signal) => { |
| 644 | resetTerminal({ |
| 645 | exitAlternateScreen: shouldExitAlternateScreen(code, signal), |
| 646 | }) |
| 647 | printCrashDiagnostics(code, signal) |
| 648 | process.exit(signal ? 1 : (code || 0)) |
| 649 | } |
| 650 | |
| 651 | child.on('exit', exitListener) |
| 652 | |
| 653 | setTimeout(() => { |
| 654 | checkForUpdates(child, exitListener) |
| 655 | }, 100) |
| 656 | } |
| 657 | |
| 658 | main().catch((error) => { |
| 659 | console.error('❌ Unexpected error:', error.message) |
no test coverage detected