From 7f09a7619c863c964a93ceb915d6e0b9ddc39e2e Mon Sep 17 00:00:00 2001 From: Ethan Brierley Date: Tue, 15 Jun 2021 17:23:57 +0100 Subject: [PATCH] fix: CARGO_TARGET_DIR_freeze (#9114) --- utils/wasm-builder/src/prerequisites.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/wasm-builder/src/prerequisites.rs b/utils/wasm-builder/src/prerequisites.rs index 5dedcc4641a72..dbbd9c0a56229 100644 --- a/utils/wasm-builder/src/prerequisites.rs +++ b/utils/wasm-builder/src/prerequisites.rs @@ -129,6 +129,10 @@ fn check_wasm_toolchain_installed( let mut run_cmd = cargo_command.command(); run_cmd.args(&["run", "--manifest-path", &manifest_path]); + // Unset the `CARGO_TARGET_DIR` to prevent a cargo deadlock + build_cmd.env_remove("CARGO_TARGET_DIR"); + run_cmd.env_remove("CARGO_TARGET_DIR"); + build_cmd .output() .map_err(|_| err_msg.clone())