targets/wasm_exec: call process.exit() when go.run() returns

This commit is contained in:
Damian Gryski
2024-11-13 13:44:31 -08:00
committed by Ayke
parent 4f96a50fd0
commit 91563cff1f
+4 -1
View File
@@ -531,7 +531,10 @@
const go = new Go();
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
return go.run(result.instance);
go.run(result.instance).then((result) => {
process.exit(result);
}).
catch((e) => { throw e });
}).catch((err) => {
console.error(err);
process.exit(1);