From 9cd22dbc0766bbf87c00e7add38feef4c8e3761b Mon Sep 17 00:00:00 2001 From: pjsier Date: Mon, 27 Sep 2021 19:47:03 -0500 Subject: [PATCH] resolve target triple before calling can_run --- src/cli/rustup_mode.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs index 0c4eaf53e21..d938cff8de4 100644 --- a/src/cli/rustup_mode.rs +++ b/src/cli/rustup_mode.rs @@ -959,8 +959,8 @@ fn update(cfg: &mut Cfg, m: &ArgMatches<'_>) -> Result { if toolchain_has_triple { let host_arch = TargetTriple::from_host_or_build(); - if let Ok(toolchain_desc) = ToolchainDesc::from_str(name) { - let target_triple = toolchain_desc.target; + if let Ok(partial_toolchain_desc) = PartialToolchainDesc::from_str(name) { + let target_triple = partial_toolchain_desc.resolve(&host_arch)?.target; if !forced && !host_arch.can_run(&target_triple)? { err!("DEPRECATED: future versions of rustup will require --force-non-host to install a non-host toolchain as the default."); warn!(