fix(build): ignore empty bundle directories (#27491)

These are often left after some file moves.
This commit is contained in:
Dmitry Gozman 2023-10-06 12:29:01 -07:00 committed by GitHub
parent ae5610f5c1
commit 7447761fb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,8 +195,10 @@ for (const pkg of workspace.packages()) {
const bundlesDir = path.join(pkg.path, 'bundles');
if (!fs.existsSync(bundlesDir))
continue;
for (const bundle of fs.readdirSync(bundlesDir))
bundles.push(path.join(bundlesDir, bundle));
for (const bundle of fs.readdirSync(bundlesDir)) {
if (fs.existsSync(path.join(bundlesDir, bundle, 'package.json')))
bundles.push(path.join(bundlesDir, bundle));
}
}
// Update test runner.