mirror of
https://github.com/Hopiu/lychee.git
synced 2026-04-04 13:40:37 +00:00
Fix verbosity serialization (#853)
Forgot the serde defaults which lead to problems on some terminals
This commit is contained in:
parent
93a1481305
commit
e476965bee
1 changed files with 3 additions and 1 deletions
|
|
@ -83,6 +83,7 @@ default_function! {
|
|||
timeout: usize = DEFAULT_TIMEOUT_SECS;
|
||||
retry_wait_time: usize = DEFAULT_RETRY_WAIT_TIME_SECS;
|
||||
method: String = DEFAULT_METHOD.to_string();
|
||||
verbosity: Verbosity<WarnLevel> = Verbosity::new(1, 0);
|
||||
}
|
||||
|
||||
// Macro for merging configuration values
|
||||
|
|
@ -142,6 +143,7 @@ impl LycheeOptions {
|
|||
pub(crate) struct Config {
|
||||
/// Verbose program output
|
||||
#[clap(flatten)]
|
||||
#[serde(default = "verbosity")]
|
||||
pub(crate) verbose: Verbosity<WarnLevel>,
|
||||
|
||||
/// Do not show progress bar.
|
||||
|
|
@ -363,7 +365,7 @@ impl Config {
|
|||
self, toml;
|
||||
|
||||
// Keys with defaults to assign
|
||||
verbose: Verbosity::new(0, 0);
|
||||
verbose: Verbosity::new(1, 0);
|
||||
cache: false;
|
||||
no_progress: false;
|
||||
max_redirects: DEFAULT_MAX_REDIRECTS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue