Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): correctly display error messages …
Browse files Browse the repository at this point in the history
…that contain "at" text.

Previously, the regexp was incorrectly matching messages which contained "at" as part of the text.

Closes #23865

(cherry picked from commit 4f8a3d2)
  • Loading branch information
alan-agius4 committed Sep 8, 2022
1 parent 6508db2 commit e7e0cb7
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -397,7 +397,7 @@ export function statsErrorsToString(
// See: https://github.com/webpack/webpack/issues/15980
const message = statsConfig.errorStack
? error.message
: /[\s\S]+?(?=[\n\s]+at)/.exec(error.message)?.[0] ?? error.message;
: /[\s\S]+?(?=\n+\s+at\s)/.exec(error.message)?.[0] ?? error.message;

if (!/^error/i.test(message)) {
output += r('Error: ');
Expand Down

0 comments on commit e7e0cb7

Please sign in to comment.