Skip to content

Commit 258dac2

Browse files
aykevldgryski
authored andcommitted
wasm: tidy up wasm_exec.js a bit
1 parent b7d91e2 commit 258dac2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

targets/wasm_exec.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,9 @@
530530
}
531531

532532
const go = new Go();
533-
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
534-
go.run(result.instance).then((result) => {
535-
process.exit(result);
536-
}).
537-
catch((e) => { throw e });
533+
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then(async (result) => {
534+
let exitCode = await go.run(result.instance);
535+
process.exit(exitCode);
538536
}).catch((err) => {
539537
console.error(err);
540538
process.exit(1);

0 commit comments

Comments
 (0)