Skip to content

Commit

Permalink
wasm: tidy up wasm_exec.js a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
aykevl committed Nov 14, 2024
1 parent 91563cf commit b725936
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions targets/wasm_exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,9 @@
}

const go = new Go();
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
go.run(result.instance).then((result) => {
process.exit(result);
}).
catch((e) => { throw e });
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then(async (result) => {
let exitCode = await go.run(result.instance);
process.exit(exitCode);
}).catch((err) => {
console.error(err);
process.exit(1);
Expand Down

0 comments on commit b725936

Please sign in to comment.