diff --git a/lib/fs.js b/lib/fs.js index 32d78b7b18..d407cf1479 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1532,6 +1532,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; }