diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index f556b6e47f6..48ad549d4ef 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -72,6 +72,7 @@ namespace Harness { for (const file of fs.readdirSync(folder)) { const pathToFile = pathModule.join(folder, file); + if (!fs.existsSync(pathToFile)) continue; // ignore invalid symlinks const stat = fs.statSync(pathToFile); if (options.recursive && stat.isDirectory()) { paths = paths.concat(filesInFolder(pathToFile));