Add env var BINSTALL_NO_DISCOVER_GITHUB_TOKEN (#1763)

* Add env var BINSTALL_NO_DISCOVER_GITHUB_TOKEN

For #1733

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix fmt

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix fmt

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-06-14 23:21:14 +10:00 committed by GitHub
parent 5c9a7b2c80
commit 4c68c80ab8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -144,7 +144,12 @@ 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(), env = "BINSTALL_RATE_LIMIT")]
#[clap(
help_heading = "Overrides",
long,
default_value_t = RateLimit::default(),
env = "BINSTALL_RATE_LIMIT"
)]
pub(crate) rate_limit: RateLimit,
/// Specify the strategies to be used,
@ -170,7 +175,11 @@ pub struct Args {
/// `$HOME/.git-credentials` or `$HOME/.config/gh/hosts.yml` by default.
///
/// This option can be used to disable that behavior.
#[clap(help_heading = "Overrides", long)]
#[clap(
help_heading = "Overrides",
long,
env = "BINSTALL_NO_DISCOVER_GITHUB_TOKEN"
)]
pub(crate) no_discover_github_token: bool,
/// This flag is now enabled by default thus a no-op.