File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1313//! different name. 
1414
1515#![ recursion_limit = "1024" ]  
16+ #![ feature( rt) ]  
1617
1718use  std:: path:: PathBuf ; 
19+ #[ cfg( feature = "rt" ) ]  
20+ use  std:: rt; 
1821
1922use  cfg_if:: cfg_if; 
2023use  rs_tracing:: * ; 
2124
2225use  rustup:: cli:: common; 
2326use  rustup:: cli:: errors:: * ; 
27+ #[ cfg( feature = "rt" ) ]  
28+ use  rustup:: cli:: log; 
2429use  rustup:: cli:: proxy_mode; 
2530use  rustup:: cli:: rustup_mode; 
2631#[ cfg( windows) ]  
@@ -42,6 +47,10 @@ fn main() {
4247} 
4348
4449fn  run_rustup ( )  -> Result < utils:: ExitCode >  { 
50+     #[ cfg( feature = "rt" ) ]  
51+     { 
52+         let  _ = rt:: at_exit ( log:: on_quit_log) ; 
53+     } 
4554    if  let  Ok ( dir)  = process ( ) . var ( "RUSTUP_TRACE_DIR" )  { 
4655        open_trace_file ! ( dir) ?; 
4756    } 
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ macro_rules! debug {
2323    (  $ (  $ arg :  tt )  *  )  => (  $crate:: cli:: log:: debug_fmt (  format_args ! (  $ (  $ arg )  *  )  )  ) 
2424} 
2525
26+ pub  fn  on_quit_log ( )  { 
27+     let  mut  t = term2:: stderr ( ) ; 
28+     let  _ = t. reset ( ) ; 
29+ } 
30+ 
2631pub  fn  warn_fmt ( args :  fmt:: Arguments < ' _ > )  { 
2732    let  mut  t = term2:: stderr ( ) ; 
2833    let  _ = t. fg ( term2:: color:: YELLOW ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments