about summary refs log tree commit diff
path: root/tvix/eval/src/builtins/impure.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-12-12T16·36+0300
committertazjin <tazjin@tvl.su>2022-12-21T22·53+0000
commit51deadd983a7058348554672286736d67d999a67 (patch)
tree902aa4f52dba24d67c6eb520ea4eba28f40ca7f8 /tvix/eval/src/builtins/impure.rs
parentec3e38c2d6f3eed87bb3f36060bd4dac09a9da75 (diff)
refactor(tvix/eval): use `EvalIO::path_exists` for the builtin r/5463
Change-Id: I49822ce30137777865e7370ee86666636e277b35
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7573
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/builtins/impure.rs')
-rw-r--r--tvix/eval/src/builtins/impure.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tvix/eval/src/builtins/impure.rs b/tvix/eval/src/builtins/impure.rs
index c2ba2f2a07f7..d91f703a6ab7 100644
--- a/tvix/eval/src/builtins/impure.rs
+++ b/tvix/eval/src/builtins/impure.rs
@@ -28,7 +28,8 @@ mod impure_builtins {
 
     #[builtin("pathExists")]
     fn builtin_path_exists(vm: &mut VM, s: Value) -> Result<Value, ErrorKind> {
-        Ok(coerce_value_to_path(&s, vm)?.exists().into())
+        let path = coerce_value_to_path(&s, vm)?;
+        vm.io().path_exists(path).map(Value::Bool)
     }
 
     #[builtin("readDir")]