We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac9994a commit c655d38Copy full SHA for c655d38
lib/fs.js
@@ -471,8 +471,8 @@ function readFileSync(path, options) {
471
472
const isUserFd = isFd(path); // File descriptor ownership
473
474
- // TODO: Do not handle file descriptor ownership for now.
475
- if (!isUserFd && options.encoding === 'utf8') {
+ // TODO(@anonrig): Do not handle file descriptor ownership for now.
+ if (!isUserFd && (options.encoding === 'utf8' || options.encoding === 'utf-8')) {
476
return readFileSyncUtf8(getValidatedPath(path), stringToFlags(options.flag));
477
}
478
0 commit comments