diff --git a/tool/cli.ts b/tool/cli.ts index 5b5cd7368014..2f0379e1f3d0 100644 --- a/tool/cli.ts +++ b/tool/cli.ts @@ -236,7 +236,11 @@ function tryOrExit( await f({ options, ...args } as T); } catch (e) { const error = e as Error; - if (options.verbose || options.v) { + if ( + options.verbose || + options.v || + (error instanceof Error && !error.message) + ) { console.error(chalk.red(error.stack)); } throw error;