Improve error output of wasm-builder when wasm ins't installed (#7105)

This improves the error message of wasm-builder when the wasm toolchain
isn't installed. Currently we print that the wasm toolchain is not
installed, but the actual problem is that there is a bug in the
packaging in rust. This will now be much easier to debug, by printing
the full error message of the compiler.
This commit is contained in:
Bastian Köcher
2020-09-15 11:42:23 +02:00
committed by GitHub
parent 3d94d80309
commit 9dd5812eaf
5 changed files with 46 additions and 12 deletions
+6 -1
View File
@@ -179,7 +179,7 @@ pub fn build_project_with_default_rustflags(
bloaty.wasm_binary_bloaty_path_escaped(),
)
};
write_file_if_changed(
file_name.into(),
format!(
@@ -309,3 +309,8 @@ impl CargoCommand {
.contains("-nightly")
}
}
/// Returns `true` when color output is enabled.
fn color_output_enabled() -> bool {
env::var(crate::WASM_BUILD_NO_COLOR).is_err()
}