Skip to content

Commit

Permalink
feat: do not warn about outdated toolchains with --no-net
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed Dec 11, 2024
1 parent 3506442 commit 417e1ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/elan/toolchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ pub fn resolve_toolchain_desc_ext(cfg: &Cfg, unresolved_tc: &UnresolvedToolchain
Ok(release) => Ok(ToolchainDesc::Remote { origin: origin.clone(), release, from_channel: Some(channel.clone()) }),
Err(e) => {
if let (true, Some(tc)) = (use_cache, find_latest_local_toolchain(cfg, &release)) {
(cfg.notify_handler)(Notification::UsingExistingRelease(&tc));
if !no_net {
(cfg.notify_handler)(Notification::UsingExistingRelease(&tc));
}
Ok(tc)
} else {
Err(e)?
Expand Down

0 comments on commit 417e1ab

Please sign in to comment.