From e4e03833fc430d44384362a121f2a24b49e0cb4a Mon Sep 17 00:00:00 2001 From: Tom Boshoven Date: Wed, 2 Apr 2025 16:22:28 -0400 Subject: [PATCH] [docs] Fix suggestion for index strategy (#12634) ## Summary Fix a suggestion in the docs on configs through environment variables, which lists an option value that doesn't appear to exist. The description implies that `unsafe-best-match` was intended here. ## Test Plan Verified by providing `unsafe-any-match` as a parameter to `uv`. It didn't error, but appeared to use the `first-index` strategy instead. The value I changed it to behaves as described by the documentation. --- crates/uv-static/src/env_vars.rs | 2 +- docs/configuration/environment.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/uv-static/src/env_vars.rs b/crates/uv-static/src/env_vars.rs index 3e5781ea9..406789893 100644 --- a/crates/uv-static/src/env_vars.rs +++ b/crates/uv-static/src/env_vars.rs @@ -87,7 +87,7 @@ impl EnvVars { /// Equivalent to the `--index-strategy` command-line argument. /// - /// For example, if set to `unsafe-any-match`, uv will consider versions of a given package + /// For example, if set to `unsafe-best-match`, uv will consider versions of a given package /// available across all index URLs, rather than limiting its search to the first index URL /// that contains the package. pub const UV_INDEX_STRATEGY: &'static str = "UV_INDEX_STRATEGY"; diff --git a/docs/configuration/environment.md b/docs/configuration/environment.md index 397b99d00..3a4412f8e 100644 --- a/docs/configuration/environment.md +++ b/docs/configuration/environment.md @@ -115,7 +115,7 @@ space-separated list of URLs as additional indexes when searching for packages. Equivalent to the `--index-strategy` command-line argument. -For example, if set to `unsafe-any-match`, uv will consider versions of a given package +For example, if set to `unsafe-best-match`, uv will consider versions of a given package available across all index URLs, rather than limiting its search to the first index URL that contains the package.