[READ-ONLY] Mirror of https://github.com/bombshell-dev/clack. Effortlessly build beautiful command-line apps bomb.sh/docs/clack/basics/getting-started/
cli command-line command-line-app node prompt prompts
5

Configure Feed

Select the types of activity you want to include in your feed.

refactor: remove duplicate error log

Bruno Rocha (May 3, 2023, 2:49 PM -0300) 5f1af37d ba2f3a31

+3 -4
+3 -4
packages/prompts/src/index.ts
··· 642 642 unblock(); 643 643 }; 644 644 645 - const handleExit = (code: number, error?: unknown) => { 645 + const handleExit = (code: number) => { 646 646 const message = code > 1 ? 'Something went wrong' : 'Canceled'; 647 647 if (isSpinnerActive) stop(message, code); 648 - if (error) console.error(error); 649 648 }; 650 649 651 650 // Reference: https://nodejs.org/api/process.html#event-uncaughtexception 652 - process.on('uncaughtException', (error) => handleExit(2, error)); 651 + process.on('uncaughtExceptionMonitor', () => handleExit(2)); 653 652 // Reference: https://nodejs.org/api/process.html#event-unhandledrejection 654 - process.on('unhandledRejection', (error) => handleExit(2, error)); 653 + process.on('unhandledRejection', () => handleExit(2)); 655 654 // Reference Signal Events: https://nodejs.org/api/process.html#signal-events 656 655 process.on('SIGINT', () => handleExit(1)); 657 656 process.on('SIGTERM', () => handleExit(1));