File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 13
13
//! different name.
14
14
15
15
#![ recursion_limit = "1024" ]
16
+ #![ feature( rt) ]
16
17
17
18
use std:: path:: PathBuf ;
19
+ #[ cfg( feature = "rt" ) ]
20
+ use std:: rt;
18
21
19
22
use cfg_if:: cfg_if;
20
23
use rs_tracing:: * ;
21
24
22
25
use rustup:: cli:: common;
23
26
use rustup:: cli:: errors:: * ;
27
+ #[ cfg( feature = "rt" ) ]
28
+ use rustup:: cli:: log;
24
29
use rustup:: cli:: proxy_mode;
25
30
use rustup:: cli:: rustup_mode;
26
31
#[ cfg( windows) ]
@@ -42,6 +47,10 @@ fn main() {
42
47
}
43
48
44
49
fn run_rustup ( ) -> Result < utils:: ExitCode > {
50
+ #[ cfg( feature = "rt" ) ]
51
+ {
52
+ let _ = rt:: at_exit ( log:: on_quit_log) ;
53
+ }
45
54
if let Ok ( dir) = process ( ) . var ( "RUSTUP_TRACE_DIR" ) {
46
55
open_trace_file ! ( dir) ?;
47
56
}
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ macro_rules! debug {
23
23
( $ ( $ arg : tt ) * ) => ( $crate:: cli:: log:: debug_fmt ( format_args ! ( $ ( $ arg ) * ) ) )
24
24
}
25
25
26
+ pub fn on_quit_log ( ) {
27
+ let mut t = term2:: stderr ( ) ;
28
+ let _ = t. reset ( ) ;
29
+ }
30
+
26
31
pub fn warn_fmt ( args : fmt:: Arguments < ' _ > ) {
27
32
let mut t = term2:: stderr ( ) ;
28
33
let _ = t. fg ( term2:: color:: YELLOW ) ;
You can’t perform that action at this time.
0 commit comments