Fix release script to ignore empty package folders
This commit is contained in:
parent
f42431abe1
commit
7c21bf72ac
|
@ -128,10 +128,17 @@ const getPublicPackages = () => {
|
|||
|
||||
const packagePath = join(packagesRoot, dir, 'package.json');
|
||||
|
||||
if (dir.charAt(0) !== '.' && statSync(packagePath).isFile()) {
|
||||
const packageJSON = JSON.parse(readFileSync(packagePath));
|
||||
|
||||
return packageJSON.private !== true;
|
||||
if (dir.charAt(0) !== '.') {
|
||||
let stat;
|
||||
try {
|
||||
stat = statSync(packagePath);
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
if (stat.isFile()) {
|
||||
const packageJSON = JSON.parse(readFileSync(packagePath));
|
||||
return packageJSON.private !== true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue