diff --git a/tool/cli.ts b/tool/cli.ts index 215f189aacfb..268c48db208e 100644 --- a/tool/cli.ts +++ b/tool/cli.ts @@ -630,7 +630,7 @@ program const allHistory = {}; for (const [relPath, value] of map) { const locale = relPath.split(path.sep)[0]; - if (!isValidLocale(locale)) { + if (!isValidLocale(locale) && locale !== "de") { continue; } allHistory[relPath] = value; @@ -652,7 +652,12 @@ program return 0; }); const root = getRoot(locale); - const outputFile = path.join(root, locale, "_githistory.json"); + const outputDir = path.join(root, locale); + if (!fs.existsSync(outputDir)) { + console.log(chalk.yellow(`Skipping ${locale}`)); + continue; + } + const outputFile = path.join(outputDir, "_githistory.json"); fs.writeFileSync( outputFile, JSON.stringify(Object.fromEntries(sorted), null, 2),