Add field cli_overrides to binstall::Options

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-21 15:00:01 +10:00
parent f09004b5b7
commit aa88dce215
No known key found for this signature in database
GPG key ID: 591C0B03040416D6
3 changed files with 8 additions and 9 deletions

View file

@ -72,12 +72,10 @@ impl Resolution {
}
}
#[allow(clippy::too_many_arguments)]
pub async fn resolve(
opts: Arc<Options>,
crate_name: CrateName,
desired_targets: DesiredTargets,
cli_overrides: Arc<PkgOverride>,
temp_dir: Arc<Path>,
install_path: Arc<Path>,
client: Client,
@ -136,7 +134,7 @@ pub async fn resolve(
target_meta.merge(&o);
}
target_meta.merge(&cli_overrides);
target_meta.merge(&opts.cli_overrides);
debug!("Found metadata: {target_meta:?}");
let fetcher_data = Data {
@ -158,7 +156,7 @@ pub async fn resolve(
if let Some(o) = meta.overrides.get(&fetcher_target.to_owned()).cloned() {
meta.merge(&o);
}
meta.merge(&cli_overrides);
meta.merge(&opts.cli_overrides);
// Generate temporary binary path
let bin_path = temp_dir.join(format!("bin-{}", crate_name.name));