Skip to content

Commit 2089108

Browse files
committed
Solve issue in node port.
1 parent 7434550 commit 2089108

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

source/ports/node_port/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@ const findFilesRecursively = (directory, filePattern, depthLimit = Infinity) =>
3838
continue;
3939
}
4040

41-
const items = fs.readdirSync(dir);
41+
const items = (() => {
42+
try {
43+
return fs.readdirSync(dir);
44+
} catch (e) {
45+
return [];
46+
}
47+
})();
4248

4349
for (const item of items) {
4450
const fullPath = path.join(dir, item);

0 commit comments

Comments
 (0)