Unverified Commit c21e62f3 authored by Anna Henningsen's avatar Anna Henningsen Committed by Shelley Vohr
Browse files

module: handle Top-Level Await non-fulfills better

Handle situations in which the main `Promise` from a TLA module
is not fulfilled better:

- When not resolving the `Promise` at all, set a non-zero exit code
  (unless another one has been requested explicitly) to distinguish
  the result from a successful completion.
- When rejecting the `Promise`, always treat it like an uncaught
  exception. In particular, this also ensures a non-zero exit code.

Refs: https://github.com/nodejs/node/pull/34558

PR-URL: https://github.com/nodejs/node/pull/34640


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarGuy Bedford <guybedford@gmail.com>
Reviewed-By: default avatarMyles Borins <myles.borins@gmail.com>
Reviewed-By: default avatarYongsheng Zhang <zyszys98@gmail.com>
parent d0a599ac
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment