From d5e8531ae37897b748e515839d41226579a3bc32 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 16 Feb 2024 12:54:58 -0600 Subject: [PATCH] Add support for `UV_EXTRA_INDEX_URL` (#1515) Closes https://github.com/astral-sh/uv/issues/1450 --- crates/uv-dev/src/resolve_cli.rs | 2 +- crates/uv/src/main.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/uv-dev/src/resolve_cli.rs b/crates/uv-dev/src/resolve_cli.rs index 89678f071..c5a130a5d 100644 --- a/crates/uv-dev/src/resolve_cli.rs +++ b/crates/uv-dev/src/resolve_cli.rs @@ -45,7 +45,7 @@ pub(crate) struct ResolveCliArgs { exclude_newer: Option>, #[clap(long, short, default_value = IndexUrl::Pypi.as_str(), env = "UV_INDEX_URL")] index_url: IndexUrl, - #[clap(long)] + #[clap(long, env = "UV_EXTRA_INDEX_URL")] extra_index_url: Vec, #[clap(long)] find_links: Vec, diff --git a/crates/uv/src/main.rs b/crates/uv/src/main.rs index e019dab23..ff521c56d 100644 --- a/crates/uv/src/main.rs +++ b/crates/uv/src/main.rs @@ -238,7 +238,7 @@ struct PipCompileArgs { index_url: IndexUrl, /// Extra URLs of package indexes to use, in addition to `--index-url`. - #[clap(long)] + #[clap(long, env = "UV_EXTRA_INDEX_URL")] extra_index_url: Vec, /// Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those @@ -362,7 +362,7 @@ struct PipSyncArgs { index_url: IndexUrl, /// Extra URLs of package indexes to use, in addition to `--index-url`. - #[clap(long)] + #[clap(long, env = "UV_EXTRA_INDEX_URL")] extra_index_url: Vec, /// Locations to search for candidate distributions, beyond those found in the indexes. @@ -527,7 +527,7 @@ struct PipInstallArgs { index_url: IndexUrl, /// Extra URLs of package indexes to use, in addition to `--index-url`. - #[clap(long)] + #[clap(long, env = "UV_EXTRA_INDEX_URL")] extra_index_url: Vec, /// Locations to search for candidate distributions, beyond those found in the indexes. @@ -656,7 +656,7 @@ struct VenvArgs { index_url: IndexUrl, /// Extra URLs of package indexes to use, in addition to `--index-url`. - #[clap(long)] + #[clap(long, env = "UV_EXTRA_INDEX_URL")] extra_index_url: Vec, /// Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those