Skip to content

Commit 15443b1

Browse files
committed
fix(ui): make the log method work better with spinners
no issue - removes the carriage return hack and do things the right way
1 parent a82fba4 commit 15443b1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/ui/index.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,18 @@ class UI {
125125
message = chalk[color](message);
126126
}
127127

128+
if (this.spinner) {
129+
this.spinner.stop();
130+
this.spinner.paused = true;
131+
}
132+
128133
let stream = stderr ? 'stderr' : 'stdout';
134+
this[stream].write(`${message}\n`);
129135

130-
this[stream].write(`${this.spinner ? '\r' : ''}${message}\n`);
136+
if (this.spinner) {
137+
this.spinner.start();
138+
this.spinner.paused = false;
139+
}
131140
}
132141

133142
success(message) {

0 commit comments

Comments
 (0)