Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 9a2264c

Browse files
committed
chore(forge): make the removed locales list more compact
1 parent 77497db commit 9a2264c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/desktop/electron-forge/forge.config.cjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ module.exports = {
148148
.filter(locale => !locale.contentOnly)
149149
.map(locale => locale.electronLocale.replace("_", "-"));
150150
const keptLocales = new Set();
151+
const removedLocales = [];
151152

152153
for (const outputPath of packageResult.outputPaths) {
153154
const localesDir = path.join(outputPath, 'locales');
@@ -166,12 +167,14 @@ module.exports = {
166167
continue;
167168
}
168169

169-
console.log(`Removing unused locale file: ${file}`);
170170
const filePath = path.join(localesDir, file);
171171
fs.unlinkSync(filePath);
172+
removedLocales.push(file);
172173
}
173174
}
174175

176+
console.log(`Removed unused locale files: ${removedLocales.join(", ")}`);
177+
175178
// Ensure all locales that should be kept are actually present.
176179
for (const locale of localesToKeep) {
177180
if (!keptLocales.has(locale)) {

0 commit comments

Comments
 (0)