Skip to content

Commit 70d640e

Browse files
committed
fix: limit progress bar length to 40 when no columns provided
1 parent 42407cb commit 70d640e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lib/node/nodeConsole.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@ const clearStatusMessage = () => {
3939

4040
const writeStatusMessage = () => {
4141
if (!currentStatusMessage) return;
42-
const l = process.stderr.columns;
43-
const args = l
44-
? truncateArgs(currentStatusMessage, l - 1)
45-
: currentStatusMessage;
42+
const l = process.stderr.columns || 40;
43+
const args = truncateArgs(currentStatusMessage, l - 1);
4644
const str = args.join(" ");
4745
const coloredStr = `\u001b[1m${str}\u001b[39m\u001b[22m`;
4846
process.stderr.write(`\x1b[2K\r${coloredStr}`);

0 commit comments

Comments
 (0)