Skip to content

Commit

Permalink
resolve target triple before calling can_run
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsier committed Nov 8, 2021
1 parent 59de864 commit 9cd22db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cli/rustup_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -959,8 +959,8 @@ fn update(cfg: &mut Cfg, m: &ArgMatches<'_>) -> Result<utils::ExitCode> {

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!(
Expand Down

0 comments on commit 9cd22db

Please sign in to comment.