fix(dev-infra): format command incorrectly prints outdated files (#42252)
When `ng-dev format --check` is run, the ng-dev tool prints out all files that are out-of-date. We recently updated the format tool to also capture `stderr` for failed files. This broke the console message as we did not unwrap the `FormatFailure` to their file path when printing the "ng-dev format" fix command. PR Close #42252
This commit is contained in:
parent
ef33806480
commit
c3cbfc22e0
|
@ -70,7 +70,7 @@ export async function checkFiles(files: string[]) {
|
|||
// Inform user how to format files in the future.
|
||||
info();
|
||||
info(`To format the failing file run the following command:`);
|
||||
info(` yarn ng-dev format files ${failures.join(' ')}`);
|
||||
info(` yarn ng-dev format files ${failures.map(f => f.filePath).join(' ')}`);
|
||||
process.exit(1);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -2683,7 +2683,7 @@ function checkFiles(files) {
|
|||
// Inform user how to format files in the future.
|
||||
info();
|
||||
info(`To format the failing file run the following command:`);
|
||||
info(` yarn ng-dev format files ${failures.join(' ')}`);
|
||||
info(` yarn ng-dev format files ${failures.map(f => f.filePath).join(' ')}`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue