mirror of
https://github.com/iptv-org/database.git
synced 2024-12-21 23:40:23 -05:00
Update validate.js
This commit is contained in:
parent
0183cc27c0
commit
0801b020b0
1 changed files with 5 additions and 2 deletions
|
@ -20,12 +20,15 @@ async function main() {
|
|||
]
|
||||
for (const filepath of files) {
|
||||
if (!filepath.endsWith('.csv')) continue
|
||||
const data = await csv.load(filepath)
|
||||
const data = await csv.load(filepath).catch(err => {
|
||||
logger.error(chalk.red(`\n${err.message} (${filepath})`))
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
const filename = file.getFilename(filepath)
|
||||
|
||||
if (!schemes[filename]) {
|
||||
logger.error(chalk.red(`\nERR: "${filename}" scheme is missing`))
|
||||
logger.error(chalk.red(`\nError: "${filename}" scheme is missing`))
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue