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
fix(cli-repl): account for possibility of process.exit() throwing under coverage MONGOSH-1943 (#2298)
When running under `nyc` for coverage generation, the process's
`process.exit()` internals get monkey-patched to give `nyc` the opportunity
to write coverage data as part of that operation. However, for processes
running under changed working directories, `nyc` may try to write to an incorrect
directory, making the `fs.writeFile()` call fail with an exception,
and so `process.exit()` may not actually stop the process.
This commit adds a `process.abort()` call to make that accounts for this situation,
as well as improved debugging for it.
0 commit comments