From 417e1abbd6e24781dde778e2d75d51361378f242 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Wed, 11 Dec 2024 11:45:33 +0100 Subject: [PATCH] feat: do not warn about outdated toolchains with `--no-net` --- src/elan/toolchain.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/elan/toolchain.rs b/src/elan/toolchain.rs index f3054cd..1a09e1b 100644 --- a/src/elan/toolchain.rs +++ b/src/elan/toolchain.rs @@ -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)?