Skip to content
Snippets Groups Projects
Commit 6e424d74 authored by MOZGIII's avatar MOZGIII Committed by GitHub
Browse files

Set current dir at check_wasm_toolchain_installed at wasm-builder (#10284)

* Set current dir at check_wasm_toolchain_installed

* Add comments
parent 6c6788d8
No related merge requests found
...@@ -120,6 +120,9 @@ fn check_wasm_toolchain_installed( ...@@ -120,6 +120,9 @@ fn check_wasm_toolchain_installed(
let manifest_path = temp.path().join("Cargo.toml").display().to_string(); let manifest_path = temp.path().join("Cargo.toml").display().to_string();
let mut build_cmd = cargo_command.command(); let mut build_cmd = cargo_command.command();
// Chdir to temp to avoid including project's .cargo/config.toml
// by accident - it can happen in some CI environments.
build_cmd.current_dir(&temp);
build_cmd.args(&[ build_cmd.args(&[
"build", "build",
"--target=wasm32-unknown-unknown", "--target=wasm32-unknown-unknown",
...@@ -132,6 +135,9 @@ fn check_wasm_toolchain_installed( ...@@ -132,6 +135,9 @@ fn check_wasm_toolchain_installed(
} }
let mut run_cmd = cargo_command.command(); let mut run_cmd = cargo_command.command();
// Chdir to temp to avoid including project's .cargo/config.toml
// by accident - it can happen in some CI environments.
run_cmd.current_dir(&temp);
run_cmd.args(&["run", "--manifest-path", &manifest_path]); run_cmd.args(&["run", "--manifest-path", &manifest_path]);
// Unset the `CARGO_TARGET_DIR` to prevent a cargo deadlock // Unset the `CARGO_TARGET_DIR` to prevent a cargo deadlock
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment