From d45b1fa9edef5e3689bd49d998427e66f6492946 Mon Sep 17 00:00:00 2001 From: Rob Lensen Date: Mon, 10 May 2021 13:48:03 +0200 Subject: [PATCH] Add support for fs.realpath.native When using Node.js fs-extra realpath.native is needed --- prelude/bootstrap.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prelude/bootstrap.js b/prelude/bootstrap.js index c2e8409e2..3142b6429 100644 --- a/prelude/bootstrap.js +++ b/prelude/bootstrap.js @@ -495,7 +495,9 @@ function payloadFileSync(pointer) { ancestor.readdirSync = fs.readdirSync; ancestor.readdir = fs.readdir; ancestor.realpathSync = fs.realpathSync; + ancestor.realpathSync.native = fs.realpathSync; ancestor.realpath = fs.realpath; + ancestor.realpath.native = fs.realpath; ancestor.statSync = fs.statSync; ancestor.stat = fs.stat; ancestor.lstatSync = fs.lstatSync; @@ -1060,6 +1062,9 @@ function payloadFileSync(pointer) { callback(null, realpathFromSnapshot(f)); }; + fs.realpathSync.native = fs.realpathSync; + fs.realpath.native = fs.realpath; + // /////////////////////////////////////////////////////////////// // stat ////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////