about summary refs log tree commit diff
path: root/tvix/eval/src/value/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/value/mod.rs')
-rw-r--r--tvix/eval/src/value/mod.rs23
1 files changed, 13 insertions, 10 deletions
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs
index 1558d2cc9c24..ccca0bea5b2e 100644
--- a/tvix/eval/src/value/mod.rs
+++ b/tvix/eval/src/value/mod.rs
@@ -589,16 +589,19 @@ impl Value {
                                         .context("comparing derivations")?
                                         .clone();
 
-                                    let result = out1
-                                        .clone()
-                                        .force(co, span.clone())
-                                        .await?
-                                        .to_contextful_str()?
-                                        == out2
-                                            .clone()
-                                            .force(co, span.clone())
-                                            .await?
-                                            .to_contextful_str()?;
+                                    let out1 = out1.clone().force(co, span.clone()).await?;
+                                    let out2 = out2.clone().force(co, span.clone()).await?;
+
+                                    if out1.is_catchable() {
+                                        return Ok(out1);
+                                    }
+
+                                    if out2.is_catchable() {
+                                        return Ok(out2);
+                                    }
+
+                                    let result =
+                                        out1.to_contextful_str()? == out2.to_contextful_str()?;
                                     if !result {
                                         return Ok(Value::Bool(false));
                                     } else {