about summary refs log tree commit diff
path: root/tvix/derivation/src/output.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/derivation/src/output.rs')
-rw-r--r--tvix/derivation/src/output.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/tvix/derivation/src/output.rs b/tvix/derivation/src/output.rs
index 1236cd989f7f..cd77c00f2f41 100644
--- a/tvix/derivation/src/output.rs
+++ b/tvix/derivation/src/output.rs
@@ -1,5 +1,7 @@
 use serde::{Deserialize, Serialize};
-use tvix_store::store_path::StorePath;
+use tvix_store::store_path::{ParseStorePathError, StorePath};
+
+use crate::ValidateDerivationError;
 
 #[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
 pub struct Output {
@@ -22,8 +24,10 @@ impl Output {
         self.hash.is_some()
     }
 
-    pub fn validate(&self) -> anyhow::Result<()> {
-        StorePath::from_absolute_path(&self.path)?;
+    pub fn validate(&self) -> Result<(), ParseStorePathError> {
+        if let Err(e) = StorePath::from_absolute_path(&self.path) {
+            return Err(e);
+        }
         Ok(())
     }
 }