Skip to content

Commit

Permalink
Disable FinalizationRegistry if NODE_V8_COVERAGE is set
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <[email protected]>
  • Loading branch information
mcollina committed Oct 3, 2023
1 parent 0084b84 commit 7935a30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,9 @@ function buildSafeSonicBoom (opts) {
const stream = new SonicBoom(opts)
stream.on('error', filterBrokenPipe)
// if we are sync: false, we must flush on exit
if (!opts.sync && isMainThread) {
// NODE_V8_COVERAGE must breaks everything
// https://github.com/nodejs/node/issues/49344
if (!process.env.NODE_V8_COVERAGE && !opts.sync && isMainThread) {
setupOnExit(stream)
}
return stream
Expand Down

0 comments on commit 7935a30

Please sign in to comment.