diff --git a/src/main.rs b/src/main.rs index 4c25055..320da7b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,12 +28,11 @@ async fn main() -> Result<(), Box> { let mut config = Config::get(&options).await?; - if clap_matches.is_present("database-path") { - config.database_path = options.database_path; + if clap_matches.occurrences_of("database-path") > 0 { + config.database_path = options.database_path.clone(); } - #[cfg(debug_assertions)] - println!("{:?}", config); + dbg!(&config); #[cfg(feature = "sqlite")] let mut sqlite_connection = RwLock::new(sqlite::connect(&config.database_path).await?);