Skip to content

Commit

Permalink
Fixed temporary folder detection on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Jan 30, 2024
1 parent fb518d3 commit 751d92e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions crates/cli/src/bin/wasm-bindgen-test-runner/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<hash> directory
} else {
wasm_file_to_test
Expand Down

0 comments on commit 751d92e

Please sign in to comment.