Add --maximum-resolution-timeout ()

* Add --maximum-resolution-timeout

Fixed 

* Display default value for `--maximum-resolution-timeout` in help
This commit is contained in:
Jiahao XU 2024-08-04 12:13:18 +10:00 committed by GitHub
parent de55e465f5
commit 52f2db4f57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 76 additions and 48 deletions
crates/bin/src

View file

@ -187,6 +187,15 @@ pub struct Args {
)]
pub(crate) no_discover_github_token: bool,
/// Maximum time each resolution (one for each possible target and each strategy), in seconds.
#[clap(
help_heading = "Overrides",
long,
env = "BINSTALL_MAXIMUM_RESOLUTION_TIMEOUT",
default_value_t = NonZeroU16::new(180).unwrap(),
)]
pub(crate) maximum_resolution_timeout: NonZeroU16,
/// This flag is now enabled by default thus a no-op.
///
/// By default, Binstall will install a binary as-is in the install path.