feat: Impl support for alternative registries (#1184)

Fixed #1168

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-06-30 13:52:40 +10:00 committed by GitHub
parent d4ffc68129
commit 01a87ac606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 779 additions and 132 deletions

View file

@ -8,6 +8,7 @@ use std::{
};
use binstalk::{
drivers::Registry,
helpers::remote,
manifests::cargo_toml_binstall::PkgFmt,
ops::resolve::{CrateName, VersionReqExt},
@ -222,6 +223,10 @@ pub struct Args {
#[clap(help_heading = "Options", long, alias = "roots")]
pub root: Option<PathBuf>,
/// The URL of the registry index to use
#[clap(help_heading = "Options", long)]
pub index: Option<Registry>,
/// This option will be passed through to all `cargo-install` invocations.
///
/// It will require `Cargo.lock` to be up to date.

View file

@ -127,7 +127,7 @@ pub fn install_crates(
client,
gh_api_client,
jobserver_client,
crates_io_rate_limit: Default::default(),
registry: args.index.unwrap_or_default(),
});
// Destruct args before any async function to reduce size of the future