diff --git a/espanso-package/src/manifest.rs b/espanso-package/src/manifest.rs index 172a3a1..b6ff60f 100644 --- a/espanso-package/src/manifest.rs +++ b/espanso-package/src/manifest.rs @@ -19,7 +19,7 @@ use std::path::Path; -use anyhow::Result; +use anyhow::{Context, Result}; use serde::{Deserialize, Serialize}; #[derive(Debug, PartialEq, Serialize, Deserialize)] @@ -34,7 +34,13 @@ pub struct Manifest { impl Manifest { pub fn parse(manifest_path: &Path) -> Result { let manifest_str = std::fs::read_to_string(manifest_path)?; - Ok(serde_yaml::from_str(&manifest_str)?) + + serde_yaml::from_str(&manifest_str).with_context(|| { + format!( + "Failed manifest parsing for path: {}", + manifest_path.display() + ) + }) } }