diff options
-rw-r--r-- | tvix/eval/src/compiler/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index bf59027c8b4a..e3076246de33 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -112,7 +112,7 @@ impl<'observer> Compiler<'observer> { observer: &'observer mut dyn CompilerObserver, ) -> EvalResult<Self> { let mut root_dir = match location { - Some(dir) if dir.is_absolute() => Ok(dir), + Some(dir) if cfg!(target_arch = "wasm32") || dir.is_absolute() => Ok(dir), _ => { let current_dir = std::env::current_dir().map_err(|e| Error { kind: ErrorKind::PathResolution(format!( @@ -138,7 +138,9 @@ impl<'observer> Compiler<'observer> { let globals = globals.borrow(); + #[cfg(not(target_arch = "wasm32"))] debug_assert!(root_dir.is_absolute()); + Ok(Self { root_dir, file, |