fix(guide-ci): Handle uncaught errors

This commit is contained in:
Bouncey
2018-10-19 14:02:52 +01:00
committed by Stuart Taylor
parent 6d511c558a
commit 4cd6b568e1
3 changed files with 8 additions and 12 deletions

View File

@ -47,7 +47,13 @@ function checkFile(file) {
}
readdirp({ root: guideRoot })
.on('data', checkFile)
.on('data', file =>
checkFile(file).catch(err => {
console.error(err);
// eslint-disable-next-line no-process-exit
process.exit(1);
})
)
.on('end', () => {
console.log(`