diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index a0f69d1..94f5042 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,12 +45,16 @@ async fn main() -> Result<()> { std::process::exit(0); } - let cfg = BibiConfig::new(&mut parsed_args)?; + let mut cfg = if parsed_args.cfg_path.is_file() { + BibiConfig::new(&parsed_args)? + } else { + BibiConfig::default(&parsed_args) + }; init_error_hooks()?; // Create an application. - let mut app = App::new(&parsed_args)?; + let mut app = App::new(&mut parsed_args, &mut cfg)?; app.run(&mut parsed_args).await?; Ok(()) |
