Skip to content

Commit

Permalink
fix(@angular/cli): ng update log messages printed twice
Browse files Browse the repository at this point in the history
After the logs are printing to console clean the logs queue.

Fixes #15839
  • Loading branch information
alan-agius4 authored and vikerman committed Oct 15, 2019
1 parent a803dea commit cf34943
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/angular/cli/commands/update-impl.ts
Expand Up @@ -59,7 +59,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
options = {},
): Promise<{ success: boolean; files: Set<string> }> {
let error = false;
const logs: string[] = [];
let logs: string[] = [];
const files = new Set<string>();

const reporterSubscription = this.workflow.reporter.subscribe(event => {
Expand Down Expand Up @@ -96,6 +96,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
if (!error) {
// Output the logging queue, no error happened.
logs.forEach(log => this.logger.info(log));
logs = [];
}
}
});
Expand Down

0 comments on commit cf34943

Please sign in to comment.