mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 22:30:03 +00:00
feat: Impl support for alternative registries (#1184)
Fixed #1168 Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
d4ffc68129
commit
01a87ac606
18 changed files with 779 additions and 132 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue