feat: Read --rate-limit from env BINSTALL_RATE_LIMIT as a fallback (#1201)

feat: Scrap `--rate-limit` from env `BINSTALL_RATE_LIMIT` as a fallback

and set `BINSTALL_RATE_LIMIT` to `100/1` on CI.

Fixed #1196

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-07-17 13:07:15 +10:00 committed by GitHub
parent 963e9e97ad
commit ad58573143
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -144,7 +144,7 @@ pub struct Args {
/// allows 2 requests per 6ms.
///
/// Both duration and request count must not be 0.
#[clap(help_heading = "Overrides", long, default_value_t = RateLimit::default())]
#[clap(help_heading = "Overrides", long, default_value_t = RateLimit::default(), env = "BINSTALL_RATE_LIMIT")]
pub rate_limit: RateLimit,
/// Specify the strategies to be used,