]> Cypherpunks repositories - gostls13.git/commitdiff
misc/wasm: wasm_exec: non-zero exit code on compile error
authorRichard Musiol <mail@richard-musiol.de>
Sat, 7 Apr 2018 21:59:58 +0000 (23:59 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 27 Apr 2018 20:57:51 +0000 (20:57 +0000)
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 <bradfitz@golang.org>
misc/wasm/wasm_exec.js

index e0d6cb93cc17f764b2b576ce611b7e9184188e50..a929fbcca32e0a9e0e6616aff444150195427552 100755 (executable)
@@ -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;