Skip to content
4 changes: 4 additions & 0 deletions src/toolset/tool_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use std::{collections::BTreeMap, sync::Arc};
use crate::backend::ABackend;
use crate::cli::args::BackendArg;
use crate::config::Config;
use crate::env;
#[cfg(windows)]
use crate::file;
use crate::hash::hash_to_str;
Expand Down Expand Up @@ -247,6 +248,9 @@ impl ToolVersion {
return build(v.clone());
}
}
if env::PREFER_OFFLINE.load(std::sync::atomic::Ordering::Relaxed) {
return build(v);
}
// First try with date filter (common case)
let matches = backend
.list_versions_matching_with_opts(config, &v, opts.before_date)
Expand Down
Loading