Skip to content

Commit

Permalink
targets/wasm_exec: call process.exit() when go.run() returns
Browse files Browse the repository at this point in the history
  • Loading branch information
dgryski committed Nov 13, 2024
1 parent 4f96a50 commit 18e2f2b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion targets/wasm_exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 18e2f2b

Please sign in to comment.