From 6ae7e5078ccdc1a801921f1fd902a8e7c691c351 Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Thu, 16 Jan 2025 22:44:05 +0100 Subject: [PATCH] feat(engines): do not silence manifest read errors Now reading the manifest will only be silenced if the error's cause is the manifest not being found. --- src/main.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index f6bf023..3d7bf07 100644 --- a/src/main.rs +++ b/src/main.rs @@ -286,11 +286,13 @@ async fn run() -> anyhow::Result<()> { break 'engines; }; - let req = project - .deser_manifest() - .await - .ok() - .and_then(|mut manifest| manifest.engines.remove(&engine)); + let req = match project.deser_manifest().await { + Ok(mut manifest) => manifest.engines.remove(&engine), + Err(pesde::errors::ManifestReadError::Io(e)) if e.kind() == io::ErrorKind::NotFound => { + None + } + Err(e) => return Err(e.into()), + }; if engine == EngineKind::Pesde { match &req {