From f25bfe9f8c768b7db4e88ef7eeb512fbcc89b146 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 9 May 2022 12:58:01 +0300 Subject: [PATCH] Update update.js --- scripts/commands/readme/update.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/commands/readme/update.js b/scripts/commands/readme/update.js index add0eb2d..18f47c52 100644 --- a/scripts/commands/readme/update.js +++ b/scripts/commands/readme/update.js @@ -12,10 +12,10 @@ const options = program async function main() { const items = [] - try { - await api.countries.load() - const files = await file.list(CHANNELS_PATH) - for (const filepath of files) { + await api.countries.load().catch(console.error) + const files = await file.list(CHANNELS_PATH).catch(console.error) + for (const filepath of files) { + try { const { site, channels } = await parser.parseChannels(filepath) const dir = file.dirname(filepath) const config = require(file.resolve(`${dir}/${site}.config.js`)) @@ -31,9 +31,10 @@ async function main() { count: channels.length, group: `${suffix}/${site}` }) + } catch (err) { + console.error(err) + continue } - } catch (err) { - console.error(err) } await generateCountriesTable(items)