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: https://github.com/nodejs/node/pull/25289
Fixes: https://github.com/nodejs/node/issues/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>
This commit is contained in:
cjihrig 2018-12-30 19:44:13 -05:00
parent 49672f4518
commit d32f769d75
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -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());
}
}