mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-06 20:20:03 +00:00
Refactor: Extract new crate binstalk-{signal, downloader} (#518)
* Refactor: Extract new crate binstalk-downloader * Re-export `PkgFmt` from `binstalk_manifests` * Update release-pr.yml * Update dependabot Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
3841762a5b
commit
89fa5b1769
21 changed files with 456 additions and 260 deletions
|
@ -10,6 +10,7 @@ use crate::{
|
|||
helpers::{
|
||||
download::Download,
|
||||
remote::{Client, Url},
|
||||
signal::wait_on_cancellation_signal,
|
||||
},
|
||||
manifests::cargo_toml_binstall::{Meta, TarBasedFmt},
|
||||
};
|
||||
|
@ -53,7 +54,11 @@ pub async fn fetch_crate_cratesio(
|
|||
|
||||
let manifest_dir_path: PathBuf = format!("{name}-{version_name}").into();
|
||||
|
||||
Download::new(client, Url::parse(&crate_url)?)
|
||||
.and_visit_tar(TarBasedFmt::Tgz, ManifestVisitor::new(manifest_dir_path))
|
||||
.await
|
||||
Ok(Download::new(client, Url::parse(&crate_url)?)
|
||||
.and_visit_tar(
|
||||
TarBasedFmt::Tgz,
|
||||
ManifestVisitor::new(manifest_dir_path),
|
||||
Some(Box::pin(wait_on_cancellation_signal())),
|
||||
)
|
||||
.await?)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue