mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
wasm: tidy up wasm_exec.js a bit
This commit is contained in:
committed by
Damian Gryski
parent
b7d91e2f33
commit
258dac2324
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user