Repository: comtrya/comtrya (language: rust)

Issue:
Improve File Not Found Error Message
It should be very clear what file or directory isn't available during file and directory actions and currently it isn't


Related #198


Discussion / hints:

Fix patch:
diff --git a/lib/src/actions/file/mod.rs b/lib/src/actions/file/mod.rs
index b020fdf6..fab81679 100644
--- a/lib/src/actions/file/mod.rs
+++ b/lib/src/actions/file/mod.rs
@@ -18,6 +18,14 @@ pub trait FileAction: Action {
             .join("files")
             .join(path)
             .normalize()
+            .map_err(|e| {
+                anyhow!(
+                    "Resolution of {} failed in manifest {} because {}",
+                    path.to_string(),
+                    manifest.name.as_ref().unwrap(),
+                    e.to_string()
+                )
+            })
             .unwrap()
             .as_path()
             .to_path_buf()


Test patch: