Skip to content

Commit f3e2969

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 #23141
1 parent 2b41802 commit f3e2969

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

Lines changed: 3 additions & 3 deletions
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)