locize-cli
Advanced tools
Comparing version 8.3.0 to 8.3.1
@@ -8,2 +8,6 @@ # locize-cli change log | ||
## [8.3.1](https://github.com/locize/locize-cli/compare/v8.3.0...v8.3.1) - 2024-12-23 | ||
- special check for CVS (does not cleanup local language folders) | ||
## [8.3.0](https://github.com/locize/locize-cli/compare/v8.2.0...v8.3.0) - 2024-11-25 | ||
@@ -10,0 +14,0 @@ |
{ | ||
"name": "locize-cli", | ||
"version": "8.3.0", | ||
"version": "8.3.1", | ||
"description": "locize cli to import locales", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
15
sync.js
@@ -321,2 +321,10 @@ const fs = require('fs'); | ||
const doesDirectoryExist = (p) => { | ||
var directoryExists = false; | ||
try { | ||
directoryExists = fs.statSync(p).isDirectory(); | ||
} catch (e) {} | ||
return directoryExists; | ||
}; | ||
const cleanupLanguages = (opt, remoteLanguages) => { | ||
@@ -342,2 +350,3 @@ if (opt.pathMask.lastIndexOf(path.sep) < 0) return; | ||
} | ||
if (doesDirectoryExist(path.join(opt.path, lngPath, 'CVS'))) return; // special hack for CVS | ||
rimraf.sync(path.join(opt.path, lngPath)); | ||
@@ -586,7 +595,3 @@ }); | ||
if (opt.autoCreatePath === false) { | ||
var directoryExists = false; | ||
try { | ||
directoryExists = fs.statSync(opt.path).isDirectory(); | ||
} catch (e) {} | ||
if (!directoryExists) { | ||
if (!doesDirectoryExist(opt.path)) { | ||
return handleError(new Error(`${opt.path} does not exist!`), cb); | ||
@@ -593,0 +598,0 @@ } |
186555
3176