Skip to content
This repository was archived by the owner on Nov 5, 2020. It is now read-only.

Commit 34bc984

Browse files
committed
feat: Use readline instead of process.stdout to prevent build failure
1 parent fd8605b commit 34bc984

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils/progressBar.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Logger } from 'winston';
2+
import * as readline from 'readline';
23

34
export default class ProgressBar {
45
total: number;
@@ -55,8 +56,8 @@ export default class ProgressBar {
5556
const filledBar = '#'.repeat(filledBarLength);
5657
const emptyBar = '.'.repeat(emptyBarLength);
5758

58-
process.stdout.clearLine(0);
59-
process.stdout.cursorTo(0);
59+
readline.clearLine(process.stdout, 0);
60+
readline.cursorTo(process.stdout, 0);
6061

6162
if (this.logger) {
6263
const { error, warn, ...acceptedLevels } = this.logger.levels;

0 commit comments

Comments
 (0)