diff options
Diffstat (limited to 'src/cmd/watch.rs')
-rw-r--r-- | src/cmd/watch.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmd/watch.rs b/src/cmd/watch.rs index cde2fae..d17cf33 100644 --- a/src/cmd/watch.rs +++ b/src/cmd/watch.rs @@ -137,8 +137,11 @@ pub fn cmd<'a, 'b>(app: clap::App<'a, 'b>) -> clap::App<'a, 'b> { .arg(clap::Arg::with_name("tls").long("tls")) } -pub fn config() -> Box<dyn crate::config::Config> { - Box::new(Config::default()) +pub fn config(config: config::Config) -> Box<dyn crate::config::Config> { + Box::new(config.try_into().unwrap_or_else(|e| { + log::warn!("failed to parse config data: {}", e); + Config::default() + })) } // XXX https://github.com/rust-lang/rust/issues/64362 |