@@ -14,7 +14,7 @@ use clap::{Args, CommandFactory, Parser, Subcommand, ValueEnum, builder::Possibl
14
14
use clap_complete:: Shell ;
15
15
use console:: style;
16
16
use futures_util:: stream:: StreamExt ;
17
- use indicatif:: { MultiProgress , ProgressBar , ProgressDrawTarget , ProgressStyle } ;
17
+ use indicatif:: { MultiProgress , ProgressBar , ProgressStyle } ;
18
18
use itertools:: Itertools ;
19
19
use tracing:: { info, trace, warn} ;
20
20
use tracing_subscriber:: { EnvFilter , Registry , reload:: Handle } ;
@@ -797,7 +797,6 @@ async fn default_(
797
797
798
798
async fn check_updates ( cfg : & Cfg < ' _ > , opts : CheckOpts ) -> Result < utils:: ExitCode > {
799
799
let t = cfg. process . stdout ( ) . terminal ( cfg. process ) ;
800
- let is_a_tty = t. is_a_tty ( ) ;
801
800
let use_colors = matches ! ( t. color_choice( ) , ColorChoice :: Auto | ColorChoice :: Always ) ;
802
801
let mut update_available = false ;
803
802
let channels = cfg. list_channels ( ) ?;
@@ -806,14 +805,7 @@ async fn check_updates(cfg: &Cfg<'_>, opts: CheckOpts) -> Result<utils::ExitCode
806
805
// See: https://github.com/rust-lang/futures-rs/pull/1194#discussion_r209501774
807
806
if num_channels > 0 {
808
807
let multi_progress_bars =
809
- MultiProgress :: with_draw_target ( match cfg. process . var ( "RUSTUP_TERM_PROGRESS_WHEN" ) {
810
- Ok ( s) if s. eq_ignore_ascii_case ( "always" ) => {
811
- ProgressDrawTarget :: term_like ( Box :: new ( t) )
812
- }
813
- Ok ( s) if s. eq_ignore_ascii_case ( "never" ) => ProgressDrawTarget :: hidden ( ) ,
814
- _ if is_a_tty => ProgressDrawTarget :: term_like ( Box :: new ( t) ) ,
815
- _ => ProgressDrawTarget :: hidden ( ) ,
816
- } ) ;
808
+ MultiProgress :: with_draw_target ( cfg. process . progress_draw_target ( ) ) ;
817
809
let channels = tokio_stream:: iter ( channels. into_iter ( ) ) . map ( |( name, distributable) | {
818
810
let pb = multi_progress_bars. add ( ProgressBar :: new ( 1 ) ) ;
819
811
pb. set_style (
0 commit comments