forked from DGNum/colmena
progress: Restore tty-detection after refactoring
This commit is contained in:
parent
ba16f50722
commit
dc57b489ea
5 changed files with 9 additions and 7 deletions
|
@ -93,7 +93,9 @@ pub enum LineStyle {
|
|||
|
||||
impl SimpleProgressOutput {
|
||||
pub fn new(verbose: bool) -> Self {
|
||||
if verbose {
|
||||
let tty = atty::is(atty::Stream::Stdout);
|
||||
|
||||
if verbose || !tty {
|
||||
Self::Plain(PlainOutput::new())
|
||||
} else {
|
||||
Self::Spinner(SpinnerOutput::new())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue