Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Skip paths not found

  • Loading branch information...
commit 6e4cdfe5c1daffc6d754dfdabaadb39915b3f325 1 parent b3f31fc
Alexey Zapparov ixti authored
Showing with 13 additions and 1 deletion.
  1. +13 −1 lib/ndoc/cli.js
14 lib/ndoc/cli.js
View
@@ -250,7 +250,19 @@ cli.findFiles = function findFiles(paths, excludes, callback) {
}
// get lstats of the pathname
- lstats = fs.lstatSync(pathname);
+ try {
+ lstats = fs.lstatSync(pathname);
+ } catch (err) {
+ // file/dir not found - skip it
+ if ('ENOENT' === err.code) {
+ walk();
+ return;
+ }
+
+ // unexpected error
+ callback(err, entries.sort());
+ return;
+ }
if (!lstats.isDirectory()) {
// process non-directories directly
Please sign in to comment.
Something went wrong with that request. Please try again.