fix(scripts/utils): ignore missing package.json

This commit is contained in:
Julien Fontanet
2017-12-18 14:10:13 +01:00
parent 97d54cab11
commit 5b7a9fe969
+2 -2
View File
@@ -16,8 +16,8 @@ exports.getPackages = (readPackageJson = false) => {
readFile(`${pkg.dir}/package.json`).then(data => {
pkg.package = JSON.parse(data)
return pkg
})
))
}, noop)
)).then(pkgs => pkgs.filter(pkg => pkg !== undefined))
: pkgs
})
p.forEach = fn => p.then(pkgs => forEach.call(pkgs, fn))