Skip to content
Permalink
Browse files

coverage: use process._rawDebug() during setup

console is not ready to use at this point in the bootstrapping
process, so switch to process._rawDebug() instead.

PR-URL: #25289
Fixes: #25287
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

Backport-PR-URL: #25496
  • Loading branch information...
cjihrig authored and addaleax committed Dec 31, 2018
1 parent f8ba488 commit daca3188afb6502e1d9a996521b2ea084fc4721f
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/internal/process/coverage.js
@@ -53,7 +53,7 @@ exports.writeCoverage = writeCoverage;
function setup() {
const { Connection } = internalBinding('inspector');
if (!Connection) {
console.warn('inspector not enabled');
process._rawDebug('inspector not enabled');
return;
}

@@ -80,7 +80,7 @@ function setup() {
coverageDirectory = process.env.NODE_V8_COVERAGE =
resolve(process.env.NODE_V8_COVERAGE);
} catch (err) {
console.error(err);
process._rawDebug(err.toString());
}
}

0 comments on commit daca318

Please sign in to comment.
You can’t perform that action at this time.