diff options
Diffstat (limited to 'src/cmd.rs')
-rw-r--r-- | src/cmd.rs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -9,7 +9,9 @@ mod watch; struct Command { name: &'static str, cmd: &'static dyn for<'a, 'b> Fn(clap::App<'a, 'b>) -> clap::App<'a, 'b>, - config: &'static dyn Fn(config::Config) -> Box<dyn crate::config::Config>, + config: &'static dyn Fn( + config::Config, + ) -> Result<Box<dyn crate::config::Config>>, log_level: &'static str, } @@ -76,7 +78,7 @@ pub fn run(matches: &clap::ArgMatches<'_>) -> Result<()> { .init(); let config = crate::config::config(); - let mut cmd_config = (chosen_cmd.config)(config); + let mut cmd_config = (chosen_cmd.config)(config)?; cmd_config.merge_args(chosen_submatches)?; log::debug!("{:?}", cmd_config); cmd_config.run() |