Skip to content

Commit

Permalink
Fix folder symbolic link traversing in Windows
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
thgreasi authored Dec 14, 2021
1 parent 7bbafad commit 6a13e52
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/balena-lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ const findFiles = async (
paths.map(async (p) => {
if ((await fs.stat(p)).isDirectory()) {
files.push(
...(await globAsync(`${p}/**/*.@(${extensions.join('|')})`)),
...(await globAsync(`${p}/**/*.@(${extensions.join('|')})`, {
// Ignore unusual errors while reading directories.
// Avoids EPERM scandir errors in Windows.
// See: https://github.com/isaacs/node-glob/issues/284
strict: false
})),
);
} else {
files.push(p);
Expand Down

0 comments on commit 6a13e52

Please sign in to comment.