[wasm] Return int from console template#72623
Conversation
Also update the template tests to test that it propagates correctly as an exit code from the node process.
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
Tagging subscribers to this area: @directhex Issue DetailsAlso update the template tests to test that it propagates correctly as
|
| INTERNAL.mono_wasm_set_runtime_options(runArgs.runtimeArgs); | ||
|
|
||
| Object.assign(App, { MONO, BINDING, IMPORTS, Module, runArgs }); | ||
| Object.assign(App, { MONO, INTERNAL, BINDING, IMPORTS, Module, runArgs }); |
There was a problem hiding this comment.
It is needed here: https://github.com/dotnet/runtime/blob/main/src/mono/wasm/templates/templates/console/app-support.mjs#L49-L66
Without it, we don't call mono_wasm_exit and the exit code would be always 0.
There was a problem hiding this comment.
We should probably remove that if (App && App.INTERNAL) { check anyway. It was useful in test-main.js, but not here, IIUC. Can we done in a follow up PR though.
Also update the template tests to test that it propagates correctly as
an exit code from the node process.