mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
wasm_exec: Cross-port exit with code 1 change.
This cross-ports the following commit: https://github.com/golang/go/commit/9eef9648005c17681800fdb55ed2404ab769761e
This commit is contained in:
committed by
Ron Evans
parent
9c78f7039d
commit
4347496623
@@ -479,7 +479,7 @@
|
|||||||
!global.process.versions.electron
|
!global.process.versions.electron
|
||||||
) {
|
) {
|
||||||
if (process.argv.length != 3) {
|
if (process.argv.length != 3) {
|
||||||
process.stderr.write("usage: go_js_wasm_exec [wasm binary] [arguments]\n");
|
console.error("usage: go_js_wasm_exec [wasm binary] [arguments]");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -487,7 +487,8 @@
|
|||||||
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
|
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
|
||||||
return go.run(result.instance);
|
return go.run(result.instance);
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
throw err;
|
console.error(err);
|
||||||
|
process.exit(1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user