diff --git a/CHANGELOG.md b/CHANGELOG.md index da0f386a3c5..df01a901759 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,9 @@ * Fixed UB when freeing strings received from JS if not using the default allocator. [#3808](https://github.com/rustwasm/wasm-bindgen/pull/3808) +* Fixed temporary folder detection by `wasm-bindgen-test-runner` on MacOS. + [#3816](https://github.com/rustwasm/wasm-bindgen/pull/3816) + ## [0.2.90](https://github.com/rustwasm/wasm-bindgen/compare/0.2.89...0.2.90) Released 2024-01-06 diff --git a/crates/cli/src/bin/wasm-bindgen-test-runner/main.rs b/crates/cli/src/bin/wasm-bindgen-test-runner/main.rs index 88d5bc686d9..5700be212c4 100644 --- a/crates/cli/src/bin/wasm-bindgen-test-runner/main.rs +++ b/crates/cli/src/bin/wasm-bindgen-test-runner/main.rs @@ -88,10 +88,10 @@ fn main() -> anyhow::Result<()> { // - a tmp directory, generated by rustdoc // we would like a directory we have write access to. if we assume cargo-like directories, // we end up with the path `/wbg-out` - let tmpdir = if wasm_file_to_test - .to_string_lossy() - .starts_with("/tmp/rustdoc") - { + let tmpdir = if { + let file = wasm_file_to_test.to_string_lossy(); + file.starts_with("/tmp/rustdoc") || file.starts_with("/var/folders") + } { wasm_file_to_test.parent() // chop off the file name and give us the /tmp/rustdoc directory } else { wasm_file_to_test