Skip to content

Commit e230070

Browse files
WMS-29048 | Fix spinner get frozen on progress loader steps
1 parent 5c9616c commit e230070

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

src/custom-logger/task-logger.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,13 @@ class CustomSpinnerBar {
123123
const displayProgress = this.progressBar.status() ? progressBar : (overallProgressBar.status() ? overallProgress : '');
124124
const output = `${chalk.cyan(frame)} ${this.text} ${displayProgress}`;
125125

126-
// Only update if output changed or forced (performance optimization)
127-
if (force || output !== this.lastOutput) {
128-
// Additional check: skip if only spinner frame changed but progress is the same
129-
const progressChanged = this.progressBar.value !== this.lastProgressValue;
130-
if (force || progressChanged || !this.lastOutput) {
131-
this.clearLine();
132-
this.stream.write(output);
133-
this.lastOutput = output;
134-
this.lastProgressValue = this.progressBar.value;
135-
}
126+
const outputChanged = output !== this.lastOutput
127+
const progressChanged = this.progressBar.value !== this.lastProgressValue;
128+
if (force || progressChanged || !this.lastOutput || outputChanged) {
129+
this.clearLine();
130+
this.stream.write(output);
131+
this.lastOutput = output;
132+
this.lastProgressValue = this.progressBar.value;
136133
}
137134
}
138135

0 commit comments

Comments
 (0)