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:
Daniel Rosenwasser 2018-11-07 16:37:23 -08:00 committed by GitHub
commit 514e8a129f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,6 +117,7 @@ namespace ts {
}
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);
return `${newLine}${flattenDiagnosticMessageText(d.messageText, newLine)}${newLine}${newLine}`;
}