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.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/tvix/derivation/src/output.rs b/tvix/derivation/src/output.rs
index 982ac7c9eb79..369efca031f3 100644
--- a/tvix/derivation/src/output.rs
+++ b/tvix/derivation/src/output.rs
@@ -24,10 +24,12 @@ impl Output {
         self.hash.is_some()
     }
 
-    pub fn validate(&self) -> Result<(), OutputError> {
+    pub fn validate(&self, validate_output_paths: bool) -> Result<(), OutputError> {
         // TODO: add validation for hash, hashAlgo
-        if let Err(e) = StorePath::from_absolute_path(&self.path) {
-            return Err(OutputError::InvalidOutputPath(self.path.to_string(), e));
+        if validate_output_paths {
+            if let Err(e) = StorePath::from_absolute_path(&self.path) {
+                return Err(OutputError::InvalidOutputPath(self.path.to_string(), e));
+            }
         }
         Ok(())
     }