File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -36,20 +36,24 @@ use rustup::is_proxyable_tools;
36
36
use rustup:: process:: Process ;
37
37
use rustup:: utils;
38
38
39
- #[ tokio:: main]
40
- async fn main ( ) -> Result < ExitCode > {
39
+ fn main ( ) -> Result < ExitCode > {
41
40
#[ cfg( windows) ]
42
41
pre_rustup_main_init ( ) ;
43
42
43
+ let runtime = tokio:: runtime:: Builder :: new_multi_thread ( )
44
+ . enable_all ( )
45
+ . build ( )
46
+ . unwrap ( ) ;
47
+
44
48
let process = Process :: os ( ) ;
45
- let result = {
49
+ let result = runtime . block_on ( async {
46
50
#[ cfg( feature = "otel" ) ]
47
51
let _telemetry_guard = log:: set_global_telemetry ( ) ;
48
52
tracing_log:: LogTracer :: init ( ) ?;
49
53
let ( subscriber, console_filter) = log:: tracing_subscriber ( & process) ;
50
54
tracing:: subscriber:: set_global_default ( subscriber) ?;
51
55
run_rustup ( & process, console_filter) . await
52
- } ;
56
+ } ) ;
53
57
54
58
match result {
55
59
Err ( e) => {
You can’t perform that action at this time.
0 commit comments