mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-03 02:30:02 +00:00
Feature: Impl opt-out options (#510)
Fixed #136 * Impl opt-out optioins in binstalk * Replace field `Options::{gh_crate, quickinstall}_fetcher` with `resolver` which can determine order of resolver used. * Add new field `Args::{disable_}strategies` * Add new variant `BinstallError::InvalidStrategies` * Add variant `BinstallError::NoFallbackToCargoInstall` * Add code for supporting strategies in mod entry * Test `--disable-strategies` in `tests.sh` * Test for `--strategies` in `tests.sh` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
89fa5b1769
commit
9e80cf0700
6 changed files with 141 additions and 11 deletions
|
@ -18,7 +18,7 @@ use crate::{
|
|||
bins,
|
||||
drivers::fetch_crate_cratesio,
|
||||
errors::BinstallError,
|
||||
fetchers::{Data, Fetcher, GhCrateMeta, QuickInstall},
|
||||
fetchers::{Data, Fetcher},
|
||||
helpers::{remote::Client, tasks::AutoAbortJoinHandle},
|
||||
manifests::cargo_toml_binstall::{Meta, PkgMeta},
|
||||
};
|
||||
|
@ -211,7 +211,7 @@ async fn resolve_inner(
|
|||
meta: target_meta,
|
||||
})
|
||||
})
|
||||
.cartesian_product([GhCrateMeta::new, QuickInstall::new])
|
||||
.cartesian_product(&opts.resolver)
|
||||
.map(|(fetcher_data, f)| {
|
||||
let fetcher = f(&client, &fetcher_data);
|
||||
(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue