From e476965bee53f10b41b44979ba89307da14e3fdb Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 29 Nov 2022 12:59:32 +0100 Subject: [PATCH] Fix verbosity serialization (#853) Forgot the serde defaults which lead to problems on some terminals --- lychee-bin/src/options.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lychee-bin/src/options.rs b/lychee-bin/src/options.rs index 9d07ec6..372b664 100644 --- a/lychee-bin/src/options.rs +++ b/lychee-bin/src/options.rs @@ -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 = 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, /// 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;