mirror of
https://github.com/golang/go
synced 2024-11-26 04:27:58 -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:
parent
fb9b818bbd
commit
9eef964800
@ -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);
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user