We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3703195 commit a87fa4aCopy full SHA for a87fa4a
lib/fs.js
@@ -464,8 +464,8 @@ function readFileSync(path, options) {
464
465
const isUserFd = isFd(path); // File descriptor ownership
466
467
- // TODO: Do not handle file descriptor ownership for now.
468
- if (!isUserFd && options.encoding === 'utf8') {
+ // TODO(@anonrig): Do not handle file descriptor ownership for now.
+ if (!isUserFd && (options.encoding === 'utf8' || options.encoding === 'utf-8')) {
469
return readFileSyncUtf8(getValidatedPath(path), stringToFlags(options.flag));
470
}
471
0 commit comments