File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ fn run_rustup_inner() -> Result<utils::ExitCode> {
95
95
}
96
96
Some ( n) => {
97
97
if TOOLS . iter ( ) . chain ( DUP_TOOLS . iter ( ) ) . any ( |& name| name == n) {
98
- proxy_mode:: main ( )
98
+ proxy_mode:: main ( n )
99
99
} else {
100
100
Err ( anyhow ! ( format!(
101
101
"unknown proxy name: '{}'; valid proxy names are {}" ,
Original file line number Diff line number Diff line change 1
1
use std:: ffi:: OsString ;
2
- use std:: path:: PathBuf ;
3
2
use std:: process;
4
3
5
4
use anyhow:: Result ;
6
5
7
6
use super :: common:: set_globals;
8
- use super :: errors:: * ;
9
7
use super :: job;
10
8
use super :: self_update;
11
9
use crate :: command:: run_command_for_dir;
12
10
use crate :: utils:: utils:: { self , ExitCode } ;
13
11
use crate :: Cfg ;
14
12
15
- pub fn main ( ) -> Result < ExitCode > {
13
+ pub fn main ( arg0 : & str ) -> Result < ExitCode > {
16
14
self_update:: cleanup_self_updater ( ) ?;
17
15
18
16
let ExitCode ( c) = {
19
17
let _setup = job:: setup ( ) ;
20
18
21
- let mut args = crate :: process ( ) . args_os ( ) ;
22
-
23
- let arg0 = args. next ( ) . map ( PathBuf :: from) ;
24
- let arg0 = arg0
25
- . as_ref ( )
26
- . and_then ( |a| a. file_name ( ) )
27
- . and_then ( std:: ffi:: OsStr :: to_str) ;
28
- let arg0 = arg0. ok_or ( CLIError :: NoExeName ) ?;
19
+ let mut args = crate :: process ( ) . args_os ( ) . skip ( 1 ) ;
29
20
30
21
// Check for a toolchain specifier.
31
22
let arg1 = args. next ( ) ;
You can’t perform that action at this time.
0 commit comments