Skip to content

Commit f53c6dd

Browse files
committed
fix(@angular/cli): print schematic errors correctly
Previously, the errors were JSON stringified (https://github.com/angular/angular-cli/blob/main/packages/angular/cli/lib/cli/index.ts#L80) which caused them not to be displayed correctly. Closes angular#23141
1 parent d00ab1c commit f53c6dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/angular/cli/src/command-builder/schematics-command-module.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,11 @@ export abstract class SchematicsCommandModule
321321
if (err instanceof UnsuccessfulWorkflowExecution) {
322322
// "See above" because we already printed the error.
323323
logger.fatal('The Schematic workflow failed. See above.');
324-
325-
return 1;
326324
} else {
327-
throw err;
325+
logger.fatal(err.message);
328326
}
327+
328+
return 1;
329329
} finally {
330330
unsubscribe();
331331
}

0 commit comments

Comments
 (0)