Skip to content

Commit 6361f29

Browse files
Merge pull request #403 from gofynd/feture/multilang-fix-2
refactor(locales): avoid fetching remote items if locales dir doesn't…
2 parents bec1897 + 801a974 commit 6361f29

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gofynd/fdk-cli",
3-
"version": "8.0.1",
3+
"version": "8.0.2",
44
"main": "index.js",
55
"license": "MIT",
66
"bin": {

src/helper/locales.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ export async function hasAnyDeltaBetweenLocalAndRemoteLocales(targetDirectory):
122122
export async function syncLocales(syncMode: SyncMode, targetDirectory = ""): Promise<void> {
123123
Logger.debug(`Starting locale sync in '${syncMode}' mode.`);
124124
try {
125-
const remoteItems = await fetchRemoteItems();
126125
const localesDirExists = fs.existsSync(LOCALES_DIR(targetDirectory));
127126
if(!localesDirExists){
128127
Logger.info(`locales directory does not exist. Hence, skipping the locales sync`);
129128
return;
130129
}
130+
const remoteItems = await fetchRemoteItems();
131131
const localFiles = await getJsonFiles(targetDirectory);
132132

133133
// Map remote by filename for quick lookup

0 commit comments

Comments
 (0)