mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-10 22:10:03 +00:00
Add field desired_targets
to binstall::Options
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
aa88dce215
commit
6a95bb07e0
4 changed files with 6 additions and 11 deletions
|
@ -11,7 +11,6 @@ use crate::{bins, fetchers::Fetcher, *};
|
|||
pub async fn install(
|
||||
resolution: Resolution,
|
||||
opts: Arc<Options>,
|
||||
desired_targets: DesiredTargets,
|
||||
jobserver_client: LazyJobserverClient,
|
||||
) -> Result<()> {
|
||||
match resolution {
|
||||
|
@ -32,7 +31,7 @@ pub async fn install(
|
|||
install_from_package(fetcher, opts, cvs, version, bin_path, bin_files).await
|
||||
}
|
||||
Resolution::InstallFromSource { package } => {
|
||||
let desired_targets = desired_targets.get().await;
|
||||
let desired_targets = opts.desired_targets.get().await;
|
||||
let target = desired_targets
|
||||
.first()
|
||||
.ok_or_else(|| miette!("No viable targets found, try with `--targets`"))?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue