Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli-repl): account for possibility of
process.exit()
throwing u…
…nder 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.
- Loading branch information