fix(guide-ci): Handle uncaught errors
This commit is contained in:
@ -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(`
|
||||
|
||||
|
Reference in New Issue
Block a user