mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
Merge pull request #1461 from alexcrichton/rustfmt-web-sys
Format web-sys bindings by default
This commit is contained in:
commit
18746ecf4a
@ -113,13 +113,13 @@ fn try_main() -> Result<(), failure::Error> {
|
||||
|
||||
// run rustfmt on the generated file - really handy for debugging
|
||||
println!("cargo:rerun-if-env-changed=WEBIDL_RUSTFMT_BINDINGS");
|
||||
if env::var("WEBIDL_RUSTFMT_BINDINGS").is_ok() {
|
||||
if env::var("WEBIDL_RUSTFMT_BINDINGS").ok() != Some("0".to_string()) {
|
||||
let status = Command::new("rustfmt")
|
||||
.arg(&out_file_path)
|
||||
.status()
|
||||
.context("running rustfmt")?;
|
||||
if !status.success() {
|
||||
bail!("rustfmt failed: {}", status)
|
||||
println!("cargo:warning=rustfmt failed: {}", status)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user