diff --git a/lib/fs.js b/lib/fs.js index bd027c3427..c4f7d70617 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1528,6 +1528,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; }