Browse Source

If file not found at all, don't attempt to list it

Like the automatically generated `index.js` main from `npm init` if it's
actually not there.
master
Tony Kovanen 9 years ago
parent
commit
44de0cc8d7
  1. 7
      lib/get-files.js

7
lib/get-files.js

@ -126,7 +126,12 @@ const explode = async function (paths, ignored, { limit, debug }) {
// in case the file comes from `files` or `main`
// and it wasn't specified with `.js` by the user
path = file + '.js';
s = await stat(path);
try {
s = await stat(path);
} catch (e2) {
return null;
}
}
if (isIgnored(file, ignored)) {

Loading…
Cancel
Save