Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/uv-settings/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ impl FilesystemOptions {
}

pub fn system() -> Result<Option<Self>, Error> {
if parse_boolish_environment_variable(EnvVars::UV_NO_SYSTEM_CONFIG)? == Some(true) {
return Ok(None);
}

let Some(file) = system_config_file() else {
return Ok(None);
};
Expand Down
4 changes: 4 additions & 0 deletions crates/uv-static/src/env_vars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ impl EnvVars {
#[attr_added_in("0.2.30")]
pub const UV_NO_CONFIG: &'static str = "UV_NO_CONFIG";

/// If set, uv will not read system-level configuration files.
#[attr_added_in("0.11.15")]
Comment thread
zanieb marked this conversation as resolved.
Outdated
pub const UV_NO_SYSTEM_CONFIG: &'static str = "UV_NO_SYSTEM_CONFIG";

/// Equivalent to the `--isolated` command-line argument. If set, uv will avoid discovering
/// a `pyproject.toml` or `uv.toml` file.
#[attr_added_in("0.8.14")]
Expand Down
Loading