diff --git a/src/command.rs b/src/command.rs index 4724586..a65b872 100644 --- a/src/command.rs +++ b/src/command.rs @@ -174,8 +174,17 @@ impl Updater { for file in packages_folder.read_dir()? { let file = packages_folder.join(file?.path()); // "default.yaml"); let sys = std::fs::read_to_string(&file).unwrap(); - let toto = serde_yaml::from_str(&sys).unwrap(); - updater.systems.push(toto); + let sys = serde_yaml::from_str(&sys).map_err(|err| { + io::Error::new( + io::ErrorKind::Other, + format!( + "Encontered an error while parsing config file {}: {}", + file.display(), + err + ), + ) + })?; + updater.systems.push(sys); } eprintln!("{:#?}", updater);