Allow using default configuration file

This commit is contained in:
Daniel_I_Am 2021-12-21 20:01:57 +01:00
parent 886d27489c
commit 09d9346078

View File

@ -105,7 +105,13 @@ fn process_package(packages_path: &String, package_name: &String, url: &String)
} }
fn get_configuration_file_path() -> String { fn get_configuration_file_path() -> String {
args().nth(1).expect("Required parameter configuration file missing.") let arg = args().nth(1);
if arg.is_none() {
println!("Using default configuration file: aur_config.toml")
}
arg.unwrap_or("aur_config.toml".to_string())
} }
fn get_configuration_file_contents() -> std::io::Result<String> { fn get_configuration_file_contents() -> std::io::Result<String> {