File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,9 @@ export default async function (options: { cliArgs: string[] }) {
77
77
} else if ( typeof err === 'number' ) {
78
78
// Log nothing.
79
79
} else {
80
- logger . fatal ( 'An unexpected error occurred: ' + JSON . stringify ( err ) ) ;
80
+ logger . fatal (
81
+ `An unexpected error occurred: ${ 'toString' in err ? err . toString ( ) : JSON . stringify ( err ) } ` ,
82
+ ) ;
81
83
}
82
84
83
85
return 1 ;
Original file line number Diff line number Diff line change @@ -321,11 +321,11 @@ export abstract class SchematicsCommandModule
321
321
if ( err instanceof UnsuccessfulWorkflowExecution ) {
322
322
// "See above" because we already printed the error.
323
323
logger . fatal ( 'The Schematic workflow failed. See above.' ) ;
324
-
325
- return 1 ;
326
324
} else {
327
- throw err ;
325
+ logger . fatal ( err . message ) ;
328
326
}
327
+
328
+ return 1 ;
329
329
} finally {
330
330
unsubscribe ( ) ;
331
331
}
You can’t perform that action at this time.
0 commit comments