load all recipes from repo

This commit is contained in:
Sebastian Kuzminsky 2025-01-17 20:10:00 -07:00
parent 57b8dae357
commit f28aeaf321
3 changed files with 68 additions and 10 deletions

View file

@ -17,12 +17,11 @@ struct Args {
fn main() -> anyhow::Result<()> {
let args = Args::parse();
let repo_contents = std::fs::read_dir(args.repo).unwrap();
let repo = Repo::new(&args.repo);
println!("{:#?}", repo);
let target_str = std::fs::read_to_string(args.target)?;
let recipe: Recipe = toml::from_str(&target_str)?;
let recipe: Option<&Recipe> = repo.get_recipe(&args.target);
println!("{recipe:#?}");
let r = tools::recipe::validate_recipe(&recipe);
println!("valid? {r:#?}");
Ok(())
}