From d7779546a599d8a357eccbca24263afd7bca565c Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 15 Oct 2019 08:24:36 +0200 Subject: [PATCH] fix(@angular/cli): ng update log messages printed twice After the logs are printing to console clean the logs queue. Fixes #15839 --- packages/angular/cli/commands/update-impl.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts index 0e622e363548..9330e86125d3 100644 --- a/packages/angular/cli/commands/update-impl.ts +++ b/packages/angular/cli/commands/update-impl.ts @@ -59,7 +59,7 @@ export class UpdateCommand extends Command { options = {}, ): Promise<{ success: boolean; files: Set }> { let error = false; - const logs: string[] = []; + let logs: string[] = []; const files = new Set(); const reporterSubscription = this.workflow.reporter.subscribe(event => { @@ -96,6 +96,7 @@ export class UpdateCommand extends Command { if (!error) { // Output the logging queue, no error happened. logs.forEach(log => this.logger.info(log)); + logs = []; } } });