Allow using default configuration file
This commit is contained in:
parent
886d27489c
commit
09d9346078
@ -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> {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user