Skip to content

Commit

Permalink
Skip paths not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Jul 16, 2012
1 parent b3f31fc commit 6e4cdfe
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/ndoc/cli.js
Expand Up @@ -250,7 +250,19 @@ cli.findFiles = function findFiles(paths, excludes, callback) {
} }


// get lstats of the pathname // 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()) { if (!lstats.isDirectory()) {
// process non-directories directly // process non-directories directly
Expand Down

0 comments on commit 6e4cdfe

Please sign in to comment.