mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +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();
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user