Skip to content

Commit

Permalink
fix(spinner): handle 0 tty cols case (#755)
Browse files Browse the repository at this point in the history
closes #607
  • Loading branch information
antongolub committed Mar 30, 2024
1 parent a950a05 commit 1124e31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/goods.ts
Expand Up @@ -197,7 +197,7 @@ export async function spinner<T>(
result = await callback!()
} finally {
clearInterval(id as NodeJS.Timeout)
process.stderr.write(' '.repeat(process.stdout.columns - 1) + '\r')
process.stderr.write(' '.repeat((process.stdout.columns || 1) - 1) + '\r')
}
return result
})
Expand Down

0 comments on commit 1124e31

Please sign in to comment.