mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
targets/wasm_exec: call process.exit() when go.run() returns
This commit is contained in:
@@ -531,7 +531,10 @@
|
|||||||
|
|
||||||
const go = new Go();
|
const go = new Go();
|
||||||
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
|
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) => {
|
}).catch((err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user