use anyhow::Context; use serde::Deserialize; fn read_config(path: &str) -> anyhow::Result { let toml = std::fs::read(path) .with_context(|| format!("Failed to read config file at {path}"))?; let config = toml::from_slice(&toml) .with_context(|| format!("Failed to parse config file at {path}"))?; Ok(config) } #[derive(Deserialize)] pub struct Config { repositories: Vec, } #[derive(Deserialize)] pub struct RepoConfig { remote_git_repo: String, local_git_repo: String, remote_package_repo: String, }