feat: handle new command errors better (#1318)

This commit is contained in:
Ralph Khreish
2025-10-16 22:31:50 +02:00
committed by GitHub
parent 8649c8a347
commit 662e3865f3
18 changed files with 418 additions and 236 deletions

View File

@@ -19,7 +19,8 @@ import {
registerAllCommands,
checkForUpdate,
performAutoUpdate,
displayUpgradeNotification
displayUpgradeNotification,
displayError
} from '@tm/cli';
import {
@@ -5156,10 +5157,7 @@ async function runCLI(argv = process.argv) {
);
} else {
// Generic error handling for other errors
console.error(chalk.red(`Error: ${error.message}`));
if (getDebugFlag()) {
console.error(error);
}
displayError(error);
}
process.exit(1);