about summary refs log tree commit diff
path: root/tvix/eval/src/builtins/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/builtins/mod.rs')
-rw-r--r--tvix/eval/src/builtins/mod.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs
index 1a34ea5dfbac..09b341886c59 100644
--- a/tvix/eval/src/builtins/mod.rs
+++ b/tvix/eval/src/builtins/mod.rs
@@ -611,10 +611,11 @@ mod pure_builtins {
     #[builtin("lessThan")]
     async fn builtin_less_than(co: GenCo, x: Value, y: Value) -> Result<Value, ErrorKind> {
         let span = generators::request_span(&co).await;
-        Ok(Value::Bool(matches!(
-            x.nix_cmp_ordering(y, co, span).await?,
-            Ordering::Less
-        )))
+        match x.nix_cmp_ordering(y, co, span).await? {
+            Err(cek) => Ok(Value::Catchable(cek)),
+            Ok(Ordering::Less) => Ok(Value::Bool(true)),
+            Ok(_) => Ok(Value::Bool(false)),
+        }
     }
 
     #[builtin("listToAttrs")]