Skip to content

Commit ff064fe

Browse files
committed
Fix spinner compatibility with file i/o
Attempting to resolve #67. Spinner will still output messages but will not try to animate.
1 parent e91d4db commit ff064fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,10 @@ cli.progress = function (progress, decimals, stream) {
11351135
var spinnerInterval;
11361136
cli.spinner = function (prefix, end, stream) {
11371137
stream = stream || process.stdout;
1138+
if(!stream.clearLine) {
1139+
stream.write(prefix + '\n');
1140+
return;
1141+
}
11381142
if (end) {
11391143
stream.clearLine();
11401144
stream.cursorTo(0);

0 commit comments

Comments
 (0)