1
0
mirror of https://github.com/golang/go synced 2024-11-26 02:07:57 -07:00

misc/wasm: exit with code 1 if WebAssembly.instantiate fails

go_js_wasm_exec was returning with code 0 if WebAssembly.instantiate
failed. This made failing tests show as passed.

Change-Id: Icfb2f42e9f1c3c70ca4a130a61a63cb305edff32
Reviewed-on: https://go-review.googlesource.com/c/go/+/168885
Run-TryBot: Richard Musiol <neelance@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Richard Musiol 2019-03-24 18:17:43 +01:00 committed by Richard Musiol
parent fb9b818bbd
commit 9eef964800

View File

@ -477,7 +477,7 @@
!global.process.versions.electron
) {
if (process.argv.length < 3) {
process.stderr.write("usage: go_js_wasm_exec [wasm binary] [arguments]\n");
console.error("usage: go_js_wasm_exec [wasm binary] [arguments]");
process.exit(1);
}
@ -495,7 +495,8 @@
});
return go.run(result.instance);
}).catch((err) => {
throw err;
console.error(err);
process.exit(1);
});
}
})();