Show config file's path or read error
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user