Skip to content

Commit 8bec172

Browse files
committed
Add DUP_TOOLS as supported arg0
1 parent a738acd commit 8bec172

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/rustup-init.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use rustup::cli::setup_mode;
2828
use rustup::currentprocess::{process, with, OSProcess};
2929
use rustup::env_var::RUST_RECURSION_COUNT_MAX;
3030
use rustup::utils::utils;
31-
use rustup::TOOLS;
31+
use rustup::{TOOLS, DUP_TOOLS};
3232

3333
fn main() {
3434
let process = OSProcess::default();
@@ -67,7 +67,7 @@ fn run_rustup_inner() -> Result<utils::ExitCode> {
6767
Ok(v) => Some(v),
6868
Err(_) => process().args().next(),
6969
}
70-
.map(PathBuf::from);
70+
.map(PathBuf::from);
7171
let name = arg0
7272
.as_ref()
7373
.and_then(|a| a.file_stem())
@@ -94,7 +94,7 @@ fn run_rustup_inner() -> Result<utils::ExitCode> {
9494
}
9595
}
9696
Some(n) => {
97-
if TOOLS.iter().find(|&&name| name == n).is_some() {
97+
if TOOLS.iter().chain(DUP_TOOLS.iter()).find(|&&name| name == n).is_some() {
9898
proxy_mode::main()
9999
} else {
100100
Err(ErrorKind::UnknownProxyName(n.to_string()).into())

0 commit comments

Comments
 (0)