From a1073bef7bb963282f246d1683503b9c32ae450c Mon Sep 17 00:00:00 2001 From: Zanie Date: Tue, 19 Dec 2023 10:28:58 -0600 Subject: [PATCH] Allow the default index url to be configured with `PUFFIN_INDEX_URL` --- crates/puffin-cli/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/puffin-cli/src/main.rs b/crates/puffin-cli/src/main.rs index 700af7587..ed81fb66a 100644 --- a/crates/puffin-cli/src/main.rs +++ b/crates/puffin-cli/src/main.rs @@ -148,7 +148,7 @@ struct PipCompileArgs { output_file: Option, /// The URL of the Python Package Index. - #[clap(long, short, default_value = IndexUrl::Pypi.as_str())] + #[clap(long, short, default_value = IndexUrl::Pypi.as_str(), env = "PUFFIN_INDEX_URL")] index_url: IndexUrl, /// Extra URLs of package indexes to use, in addition to `--index-url`. @@ -214,7 +214,7 @@ struct PipSyncArgs { link_mode: install_wheel_rs::linker::LinkMode, /// The URL of the Python Package Index. - #[clap(long, short, default_value = IndexUrl::Pypi.as_str())] + #[clap(long, short, default_value = IndexUrl::Pypi.as_str(), env = "PUFFIN_INDEX_URL")] index_url: IndexUrl, /// Extra URLs of package indexes to use, in addition to `--index-url`. @@ -305,7 +305,7 @@ struct PipInstallArgs { output_file: Option, /// The URL of the Python Package Index. - #[clap(long, short, default_value = IndexUrl::Pypi.as_str())] + #[clap(long, short, default_value = IndexUrl::Pypi.as_str(), env = "PUFFIN_INDEX_URL")] index_url: IndexUrl, /// Extra URLs of package indexes to use, in addition to `--index-url`.