@@ -14,7 +14,7 @@ use clap::{Args, CommandFactory, Parser, Subcommand, ValueEnum, builder::Possibl
1414use clap_complete:: Shell ;
1515use console:: style;
1616use futures_util:: stream:: StreamExt ;
17- use indicatif:: { MultiProgress , ProgressBar , ProgressDrawTarget , ProgressStyle } ;
17+ use indicatif:: { MultiProgress , ProgressBar , ProgressStyle } ;
1818use itertools:: Itertools ;
1919use tracing:: { info, trace, warn} ;
2020use tracing_subscriber:: { EnvFilter , Registry , reload:: Handle } ;
@@ -797,7 +797,6 @@ async fn default_(
797797
798798async fn check_updates ( cfg : & Cfg < ' _ > , opts : CheckOpts ) -> Result < utils:: ExitCode > {
799799 let t = cfg. process . stdout ( ) . terminal ( cfg. process ) ;
800- let is_a_tty = t. is_a_tty ( ) ;
801800 let use_colors = matches ! ( t. color_choice( ) , ColorChoice :: Auto | ColorChoice :: Always ) ;
802801 let mut update_available = false ;
803802 let channels = cfg. list_channels ( ) ?;
@@ -806,14 +805,7 @@ async fn check_updates(cfg: &Cfg<'_>, opts: CheckOpts) -> Result<utils::ExitCode
806805 // See: https://github.com/rust-lang/futures-rs/pull/1194#discussion_r209501774
807806 if num_channels > 0 {
808807 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 ( ) ) ;
817809 let channels = tokio_stream:: iter ( channels. into_iter ( ) ) . map ( |( name, distributable) | {
818810 let pb = multi_progress_bars. add ( ProgressBar :: new ( 1 ) ) ;
819811 pb. set_style (
0 commit comments