diff --git a/lib/fs.js b/lib/fs.js index e63e2c8580..c3c6f0536e 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1662,6 +1662,7 @@ fs.realpathSync = function realpathSync(p, options) { var stat = fs.lstatSync(base); if (!stat.isSymbolicLink()) { knownHard[base] = true; + if (cache) cache.set(base, base); continue; }