From d68e18fc46406256e522cad77da9ed15ab9fa7cd Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Wed, 30 Sep 2026 11:28:33 -0700 Subject: [PATCH] test(save-dir): skip the hard-link test on sandboxed (WASI) hosts WASI has no temp dir, so tempfile::tempdir() panics there. Use the same SANDBOXED early return as the other temp-dir tests. --- libwild/src/save_dir.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libwild/src/save_dir.rs b/libwild/src/save_dir.rs index 7e7bb18ea..ee7b784f1 100644 --- a/libwild/src/save_dir.rs +++ b/libwild/src/save_dir.rs @@ -646,6 +646,10 @@ mod tests { #[test] fn copying_over_a_hard_link_to_the_source_keeps_the_source() { + // Sandboxed hosts (WASI) don't have a temp dir. + if crate::host::os::SANDBOXED { + return; + } let dir = tempfile::tempdir().unwrap(); let source = dir.path().join("input.rlib"); let dest = dir.path().join("saved.rlib");