about summary refs log tree commit diff
path: root/tvix/glue/src/builtins/errors.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-10-14T12·57+0300
committerclbot <clbot@tvl.fyi>2024-10-15T17·27+0000
commite6b39135bc505ed323b21dee3384ea4c5ad4d4b1 (patch)
tree62c0361422a6a02b41acf5713882004b3a0e8321 /tvix/glue/src/builtins/errors.rs
parent330145fa1f05c8df5f8e940441d33edad1d77361 (diff)
fix(tvix/glue/import): builtins.storeDir fixes r/8808
This didn't support store paths with a subpath joined to them, while
Nix does.

Use state.path_exists, which does. This also means we can drop the
`store_path_exists` helper, which was only used here.

Change-Id: I918ccb270f64acbdc41cb4d2a9c3c5871ce15002
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12618
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: Jörg Thalheim <joerg@thalheim.io>
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/glue/src/builtins/errors.rs')
-rw-r--r--tvix/glue/src/builtins/errors.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/glue/src/builtins/errors.rs b/tvix/glue/src/builtins/errors.rs
index af8a24e6abb8..d41c7d8e4998 100644
--- a/tvix/glue/src/builtins/errors.rs
+++ b/tvix/glue/src/builtins/errors.rs
@@ -69,8 +69,8 @@ pub enum ImportError {
     #[error("hash mismatch at ingestion of '{0}', expected: '{1}', got: '{2}'")]
     HashMismatch(String, NixHash, NixHash),
 
-    #[error("path '{}' is not in the Nix store", .0.display())]
-    PathNotInStore(PathBuf),
+    #[error("path '{}' is not absolute or invalid", .0.display())]
+    PathNotAbsoluteOrInvalid(PathBuf),
 }
 
 impl From<ImportError> for tvix_eval::ErrorKind {