@@ -162,6 +162,7 @@ let WriteStream;
|
162 | 162 | let rimraf; |
163 | 163 | let rimrafSync; |
164 | 164 | let kResistStopPropagation; |
| 165 | +let ReadFileContext; |
165 | 166 | |
166 | 167 | // These have to be separate because of how graceful-fs happens to do it's |
167 | 168 | // monkeypatching. |
@@ -363,7 +364,7 @@ function readFile(path, options, callback) {
|
363 | 364 | callback ||= options; |
364 | 365 | validateFunction(callback, 'cb'); |
365 | 366 | options = getOptions(options, { flag: 'r' }); |
366 | | -const ReadFileContext = require('internal/fs/read/context'); |
| 367 | +ReadFileContext ??= require('internal/fs/read/context'); |
367 | 368 | const context = new ReadFileContext(callback, options.encoding); |
368 | 369 | context.isUserFd = isFd(path); // File descriptor ownership |
369 | 370 | |
|