use platform-independent tempdir

This commit is contained in:
Folkert de Vries 2022-08-03 21:58:02 +02:00
parent a345649856
commit 8f67129eae
4 changed files with 9 additions and 8 deletions

View file

@ -96,7 +96,7 @@ fn wasmer_create_app(app_bytes_ptr: u32, app_bytes_len: u32) -> u32 {
Err(e) => {
println!("Failed to create Wasm module\n{:?}", e);
if false {
let path = "/tmp/roc_repl_test_invalid_app.wasm";
let path = std::env::temp_dir().join("roc_repl_test_invalid_app.wasm");
fs::write(path, app_module_bytes).unwrap();
println!("Wrote invalid wasm to {}", path);
}