Skip to content

Commit 14c4288

Browse files
committed
use emitWarning
1 parent 553af67 commit 14c4288

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/fs/promises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ async function readFileHandle(filehandle, options) {
525525
size = statFields[8 /* size */];
526526

527527
if (size > maxFileSize) {
528-
console.warn(
528+
process.emitWarning(
529529
`Warning: Detected \`fs.readFile()\` to read a huge file in memory (${size} bytes). Please consider using \`fs.createReadStream()\` instead to minimize memory overhead and increase the performance.`,
530530
);
531531
}

0 commit comments

Comments
 (0)