Merge pull request #28405 from weswigham/no-summary-non-watch-zero-errors
Do not output summary if theres nothing to report
This commit is contained in:
commit
514e8a129f
1 changed files with 1 additions and 0 deletions
|
@ -117,6 +117,7 @@ namespace ts {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getErrorSummaryText(errorCount: number, newLine: string) {
|
export function getErrorSummaryText(errorCount: number, newLine: string) {
|
||||||
|
if (errorCount === 0) return "";
|
||||||
const d = createCompilerDiagnostic(errorCount === 1 ? Diagnostics.Found_1_error : Diagnostics.Found_0_errors, errorCount);
|
const d = createCompilerDiagnostic(errorCount === 1 ? Diagnostics.Found_1_error : Diagnostics.Found_0_errors, errorCount);
|
||||||
return `${newLine}${flattenDiagnosticMessageText(d.messageText, newLine)}${newLine}${newLine}`;
|
return `${newLine}${flattenDiagnosticMessageText(d.messageText, newLine)}${newLine}${newLine}`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue