From: Richard Musiol Date: Sat, 7 Apr 2018 21:59:58 +0000 (+0200) Subject: misc/wasm: wasm_exec: non-zero exit code on compile error X-Git-Tag: go1.11beta1~638 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=adb52cff581b13f06282bd8940a6ab8ee333cb4c;p=gostls13.git misc/wasm: wasm_exec: non-zero exit code on compile error Return a non-zero exit code if the WebAssembly host fails to compile the WebAssmbly bytecode to machine code. Change-Id: I774309db2872b6a2de77a1b0392608058414160d Reviewed-on: https://go-review.googlesource.com/110097 Reviewed-by: Brad Fitzpatrick --- diff --git a/misc/wasm/wasm_exec.js b/misc/wasm/wasm_exec.js index e0d6cb93cc..a929fbcca3 100755 --- a/misc/wasm/wasm_exec.js +++ b/misc/wasm/wasm_exec.js @@ -38,6 +38,7 @@ if (typeof process !== "undefined") { // detect Node.js compileAndRun(fs.readFileSync(process.argv[2])).catch((err) => { console.error(err); + process.exit(1); }); } else { window.global = window;