Skip to content

Commit 514e8a1

Browse files
Merge pull request #28405 from weswigham/no-summary-non-watch-zero-errors
Do not output summary if theres nothing to report
2 parents 15af7e1 + 6ad58b2 commit 514e8a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/compiler/watch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ namespace ts {
117117
}
118118

119119
export function getErrorSummaryText(errorCount: number, newLine: string) {
120+
if (errorCount === 0) return "";
120121
const d = createCompilerDiagnostic(errorCount === 1 ? Diagnostics.Found_1_error : Diagnostics.Found_0_errors, errorCount);
121122
return `${newLine}${flattenDiagnosticMessageText(d.messageText, newLine)}${newLine}${newLine}`;
122123
}

0 commit comments

Comments
 (0)