Skip to content

Commit cf34943

Browse files
alan-agius4vikerman
authored andcommitted
fix(@angular/cli): ng update log messages printed twice
After the logs are printing to console clean the logs queue. Fixes #15839
1 parent a803dea commit cf34943

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/angular/cli/commands/update-impl.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
5959
options = {},
6060
): Promise<{ success: boolean; files: Set<string> }> {
6161
let error = false;
62-
const logs: string[] = [];
62+
let logs: string[] = [];
6363
const files = new Set<string>();
6464

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

0 commit comments

Comments
 (0)