Commit 83d04049 authored by Rich Trott's avatar Rich Trott
Browse files

repl: do not swallow errors in nested REPLs

For tab completion, a REPLServer instance will sometimes create another
REPLServer instance. If a callback is sent to the `.complete()` function
and that callback throws an error, it will be swallowed by the nested
REPLs domain. Re-throw the error so that processes don't silently exit
without any indication of an error (including a status code).

Fixes: https://github.com/nodejs/node/issues/21586

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


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarUjjwal Sharma <usharma1998@gmail.com>
Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
parent b3b3f53a
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