Unverified Commit b5a1b0d9 authored by Andrew Jones's avatar Andrew Jones Committed by GitHub

Check wasm optimized output file exists (#243)

* Check wasm optimized output file exists

* Fmt

* Add expected optimized file to error

* Use display for path
parent 5f0788ed
Pipeline #131766 passed with stages
in 3 minutes and 24 seconds
......@@ -317,6 +317,13 @@ fn optimize_wasm(
optimization_passes,
)?;
if !dest_optimized.exists() {
return Err(anyhow::anyhow!(
"Optimization failed, optimized wasm output file `{}` not found.",
dest_optimized.display()
));
}
let original_size = metadata(&crate_metadata.dest_wasm)?.len() as f64 / 1000.0;
let optimized_size = metadata(&dest_optimized)?.len() as f64 / 1000.0;
......
Markdown is supported
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