mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-20 20:48:43 +00:00
Skip only if version_req
is satisfied
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
431992dab0
commit
2c2b3c070f
1 changed files with 8 additions and 1 deletions
|
@ -358,7 +358,14 @@ async fn entry(jobserver_client: LazyJobserverClient) -> Result<()> {
|
|||
if opts.force {
|
||||
true
|
||||
} else if let Some(records) = &metadata {
|
||||
!records.contains(&crate_name.name)
|
||||
if let Some(version_req) = &crate_name.version_req {
|
||||
records
|
||||
.get(&crate_name.name)
|
||||
.map(|metadata| !version_req.matches(&metadata.current_version))
|
||||
.unwrap_or(true)
|
||||
} else {
|
||||
!records.contains(&crate_name.name)
|
||||
}
|
||||
} else {
|
||||
true
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue