Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
fix: i18n merge fails when output dir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxyw committed Nov 25, 2023
1 parent dca5a17 commit 76cfb11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion i18n/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ const __dirname = path.dirname(new URL(import.meta.url).pathname);
const inputDirectory = __dirname;
const outputDir = path.join(__dirname, 'merged');

fs.mkdirSync(outputDir, { recursive: true });
if (!fs.existsSync(outputDir)) {
fs.mkdirSync(outputDir, { recursive: true });
}

const mergeNamespaces = (directory) => {
const files = fs.readdirSync(directory);
Expand Down

0 comments on commit 76cfb11

Please sign in to comment.