wasm_exec: Cross-port exit with code 1 change.

This cross-ports the following commit:
9eef964800
Этот коммит содержится в:
Elliott Sales de Andrade 2020-03-26 04:16:14 -04:00 коммит произвёл Ron Evans
родитель 9c78f7039d
коммит 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);
}); });
} }
})(); })();