mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Fix skipping optional dep: Skip fetcher if they provide 0 bin (#446)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
af3316a8f3
commit
abd50a72ec
1 changed files with 15 additions and 7 deletions
|
@ -243,13 +243,21 @@ async fn resolve_inner(
|
|||
.await
|
||||
{
|
||||
Ok(bin_files) => {
|
||||
return Ok(Resolution::Fetch {
|
||||
fetcher,
|
||||
package,
|
||||
name: crate_name.name,
|
||||
version_req: version_req.to_compact_string(),
|
||||
bin_files,
|
||||
})
|
||||
if !bin_files.is_empty() {
|
||||
return Ok(Resolution::Fetch {
|
||||
fetcher,
|
||||
package,
|
||||
name: crate_name.name,
|
||||
version_req: version_req.to_compact_string(),
|
||||
bin_files,
|
||||
});
|
||||
} else {
|
||||
warn!(
|
||||
"Error when checking binaries provided by fetcher {}: \
|
||||
The fetcher does not provide any optional binary",
|
||||
fetcher.source_name(),
|
||||
);
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
warn!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue