about summary refs log tree commit diff
path: root/tvix/glue/src
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/glue/src')
-rw-r--r--tvix/glue/src/tvix_build.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/tvix/glue/src/tvix_build.rs b/tvix/glue/src/tvix_build.rs
index b75191fe3980..7ac351e9b648 100644
--- a/tvix/glue/src/tvix_build.rs
+++ b/tvix/glue/src/tvix_build.rs
@@ -141,7 +141,7 @@ where
         provide_bin_sh: true,
     });
 
-    Ok(BuildRequest {
+    let build_request = BuildRequest {
         command_args,
         outputs: output_paths,
 
@@ -161,7 +161,15 @@ where
                 .into_iter()
                 .map(|(path, contents)| AdditionalFile { path, contents }),
         ),
-    })
+    };
+
+    debug_assert!(
+        build_request.validate().is_ok(),
+        "invalid BuildRequest: {}",
+        build_request.validate().unwrap_err()
+    );
+
+    Ok(build_request)
 }
 
 /// handle passAsFile, if set.