about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix')
-rw-r--r--tvix/eval/src/nix_search_path.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/tvix/eval/src/nix_search_path.rs b/tvix/eval/src/nix_search_path.rs
index 5a650a55c7ba..8e23c2d9c24b 100644
--- a/tvix/eval/src/nix_search_path.rs
+++ b/tvix/eval/src/nix_search_path.rs
@@ -48,7 +48,12 @@ fn canonicalise(path: PathBuf) -> Result<PathBuf, ErrorKind> {
         path
     } else {
         // TODO(tazjin): probably panics in wasm?
-        std::env::current_dir()?.join(path)
+        std::env::current_dir()
+            .map_err(|e| ErrorKind::IO {
+                path: Some(path.clone()),
+                error: e.into(),
+            })?
+            .join(path)
     }
     .clean();
 
@@ -80,7 +85,10 @@ impl NixSearchPathEntry {
             }
         };
 
-        if io.path_exists(path.clone())? {
+        if io.path_exists(path.clone()).map_err(|e| ErrorKind::IO {
+            path: Some(path.clone()),
+            error: e.into(),
+        })? {
             Ok(Some(path))
         } else {
             Ok(None)