Add support for UV_OFFLINE (#9795)

Closes https://github.com/astral-sh/uv/issues/9794
This commit is contained in:
Zanie Blue 2024-12-11 09:32:58 -06:00 committed by GitHub
parent cb3fefff15
commit f64da9b763
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 58 additions and 8 deletions

View file

@ -200,7 +200,7 @@ pub struct GlobalArgs {
/// Disable network access.
///
/// When disabled, uv will only use locally cached data and locally available files.
#[arg(global = true, long, overrides_with("no_offline"))]
#[arg(global = true, long, overrides_with("no_offline"), env = EnvVars::UV_OFFLINE, value_parser = clap::builder::BoolishValueParser::new())]
pub offline: bool,
#[arg(global = true, long, overrides_with("offline"), hide = true)]