Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to catch error in expandInputFiles #751

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions src/lib/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,25 +257,28 @@ export class Application extends ChildableComponent<Application, AbstractCompone
function add(dirname: string) {
FS.readdirSync(dirname).forEach((file) => {
const realpath = Path.join(dirname, file);
if (FS.statSync(realpath).isDirectory()) {
add(realpath);
} else if (/\.tsx?$/.test(realpath)) {
if (isExcluded(realpath.replace(/\\/g, '/'))) {
return;
try {
if (FS.statSync(realpath).isDirectory()) {
add(realpath);
} else if (/\.tsx?$/.test(realpath)) {
if (isExcluded(realpath.replace(/\\/g, '/'))) {
return;
}
files.push(realpath);
}

files.push(realpath);
}
} catch (e) {}
});
}

inputFiles.forEach((file) => {
file = Path.resolve(file);
if (FS.statSync(file).isDirectory()) {
add(file);
} else if (!isExcluded(file)) {
files.push(file);
}
try {
if (FS.statSync(file).isDirectory()) {
add(file);
} else if (!isExcluded(file)) {
files.push(file);
}
} catch (e) {}
});

return files;
Expand Down