mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-06 12:10:02 +00:00
Obey crates.io crawler policy: Only make one request per sec (#908)
Fixed https://github.com/taiki-e/install-action/issues/89 Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
f37796a55f
commit
d118fa8fdb
4 changed files with 47 additions and 1 deletions
|
@ -354,7 +354,15 @@ impl PackageInfo {
|
|||
// Fetch crate via crates.io, git, or use a local manifest path
|
||||
let manifest = match opts.manifest_path.as_ref() {
|
||||
Some(manifest_path) => load_manifest_path(manifest_path)?,
|
||||
None => Box::pin(fetch_crate_cratesio(client, &name, version_req)).await?,
|
||||
None => {
|
||||
Box::pin(fetch_crate_cratesio(
|
||||
client,
|
||||
&name,
|
||||
version_req,
|
||||
&opts.crates_io_rate_limit,
|
||||
))
|
||||
.await?
|
||||
}
|
||||
};
|
||||
|
||||
let Some(mut package) = manifest.package else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue