about summary refs log tree commit diff
path: root/tvix/eval/src/nix_search_path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/nix_search_path.rs')
-rw-r--r--tvix/eval/src/nix_search_path.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/tvix/eval/src/nix_search_path.rs b/tvix/eval/src/nix_search_path.rs
index 79c19752f6c1..3e553e62bb85 100644
--- a/tvix/eval/src/nix_search_path.rs
+++ b/tvix/eval/src/nix_search_path.rs
@@ -3,7 +3,7 @@ use std::convert::Infallible;
 use std::path::{Path, PathBuf};
 use std::str::FromStr;
 
-use crate::errors::ErrorKind;
+use crate::errors::{CatchableErrorKind, ErrorKind};
 use crate::EvalIO;
 
 #[derive(Debug, Clone, PartialEq, Eq)]
@@ -134,10 +134,12 @@ impl NixSearchPath {
                 return Ok(p);
             }
         }
-        Err(ErrorKind::NixPathResolution(format!(
-            "path '{}' was not found in the Nix search path",
-            path.display()
-        )))
+        Err(ErrorKind::CatchableErrorKind(
+            CatchableErrorKind::NixPathResolution(format!(
+                "path '{}' was not found in the Nix search path",
+                path.display()
+            )),
+        ))
     }
 }
 
@@ -211,7 +213,10 @@ mod tests {
             let mut io = StdIO {};
             let err = nix_search_path.resolve(&mut io, "nope").unwrap_err();
             assert!(
-                matches!(err, ErrorKind::NixPathResolution(..)),
+                matches!(
+                    err,
+                    ErrorKind::CatchableErrorKind(CatchableErrorKind::NixPathResolution(..))
+                ),
                 "err = {err:?}"
             );
         }