You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I have a function that execute some stuff. And I want to return different exit codes, depending on the result of this execution. Something like this:
Sometimes is impossible to know when run() finished (because there may be async functions that don't return a promise), so Deno.exit() can break the execution of some things inside run(). To prevent that, I fixed it with this code:
This ensures that only after finish all process, subprocess, etc inside run(), the proper exit code is returned.
After upgrading to Deno 1.7 I'm getting the following error: error: Uncaught RangeError: Maximum call stack size exceeded. I guess this is because #9088, so Deno.exit() dispatches unload event that executed Deno.exit() that dispatches unload and so on.
To prevent this, I think unload should be triggered only once. Or if there's any other way to set an exit code without using Deno.exit(), that would be fine too.
The text was updated successfully, but these errors were encountered:
Hi.
I have a function that execute some stuff. And I want to return different exit codes, depending on the result of this execution. Something like this:
Sometimes is impossible to know when
run()
finished (because there may be async functions that don't return a promise), soDeno.exit()
can break the execution of some things insiderun()
. To prevent that, I fixed it with this code:This ensures that only after finish all process, subprocess, etc inside
run()
, the proper exit code is returned.After upgrading to Deno 1.7 I'm getting the following error:
error: Uncaught RangeError: Maximum call stack size exceeded
. I guess this is because #9088, soDeno.exit()
dispatchesunload
event that executedDeno.exit()
that dispatchesunload
and so on.To prevent this, I think
unload
should be triggered only once. Or if there's any other way to set an exit code without usingDeno.exit()
, that would be fine too.The text was updated successfully, but these errors were encountered: