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

fix: progress bar tty #139

Merged
merged 1 commit into from
Jan 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}