Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Set current dir at check_wasm_toolchain_installed at wasm-builder #10284

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions utils/wasm-builder/src/prerequisites.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ fn check_wasm_toolchain_installed(
let manifest_path = temp.path().join("Cargo.toml").display().to_string();

let mut build_cmd = cargo_command.command();
build_cmd.current_dir(&temp);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a comment here for what this is.

build_cmd.args(&[
"build",
"--target=wasm32-unknown-unknown",
Expand All @@ -132,6 +133,7 @@ fn check_wasm_toolchain_installed(
}

let mut run_cmd = cargo_command.command();
run_cmd.current_dir(&temp);
run_cmd.args(&["run", "--manifest-path", &manifest_path]);

// Unset the `CARGO_TARGET_DIR` to prevent a cargo deadlock
Expand Down