You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lookupFiles is using fs.statSync to get stat, but that method throws an error when you pass it the path to a symbolic link.
$ mocha test
fs.js:684
return binding.stat(pathModule._makeLong(path));
^
Error: ENOENT, no such file or directory 'test/.#foo.js'
at Object.fs.statSync (fs.js:684:18)
at /usr/local/lib/node_modules/mocha/bin/_mocha:442:19
at Array.forEach (native)
at lookupFiles (/usr/local/lib/node_modules/mocha/bin/_mocha:440:24)
at runAgain (/usr/local/lib/node_modules/mocha/bin/_mocha:284:24)
at Array.forEach (native)
at Object.<anonymous> (/usr/local/lib/node_modules/mocha/bin/_mocha:283:6)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
This bug is pretty common if you're using emacs, symbolic links are used as interlocks to prevent the simultaneous editing of the same file. The solution is to change to fs.lstatSync which has the same behavior, but adds the isSymbolicLink method to the fs.Stats class (see jeloou/mocha@157f597).
What do you think?
The text was updated successfully, but these errors were encountered:
lookupFiles
is usingfs.statSync
to getstat
, but that method throws an error when you pass it the path to a symbolic link.This bug is pretty common if you're using emacs, symbolic links are used as interlocks to prevent the simultaneous editing of the same file. The solution is to change to
fs.lstatSync
which has the same behavior, but adds theisSymbolicLink
method to thefs.Stats
class (see jeloou/mocha@157f597).What do you think?
The text was updated successfully, but these errors were encountered: