Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
fix: progress bar tty (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
RasPhilCo authored Jan 28, 2020
1 parent ab1343c commit 9f57d7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/styled/progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export default function progress(options?: any): any {
options = {}
}
// set noTTYOutput for options
options.noTTYOutput = Boolean(process.env.TERM !== 'dumb' && process.stdin.isTTY)
const isTTY = Boolean(process.env.TERM !== 'dumb' && process.stdin.isTTY)
options.noTTYOutput = !isTTY

return new cliProgress.SingleBar(options)
}

0 comments on commit 9f57d7f

Please sign in to comment.