Skip to content

Commit daca318

Browse files
cjihrigaddaleax
authored andcommitted
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
1 parent f8ba488 commit daca318

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/process/coverage.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ exports.writeCoverage = writeCoverage;
5353
function setup() {
5454
const { Connection } = internalBinding('inspector');
5555
if (!Connection) {
56-
console.warn('inspector not enabled');
56+
process._rawDebug('inspector not enabled');
5757
return;
5858
}
5959

@@ -80,7 +80,7 @@ function setup() {
8080
coverageDirectory = process.env.NODE_V8_COVERAGE =
8181
resolve(process.env.NODE_V8_COVERAGE);
8282
} catch (err) {
83-
console.error(err);
83+
process._rawDebug(err.toString());
8484
}
8585
}
8686

0 commit comments

Comments
 (0)