fix rmDir deprecation warning

This commit is contained in:
tophf 2022-01-30 14:23:02 +03:00
parent 799423629a
commit 84f4262176

View File

@ -60,7 +60,7 @@ function fixLngFile(lng) {
if (resStr !== jsonStr) {
let err;
if (resStr === '{}') {
fs.rmdirSync(`${DIR}${lng}`, {recursive: true});
fs.rmSync(`${DIR}${lng}`, {recursive: true, force: true});
err = 'no translations -> deleted';
} else {
fse.outputFileSync(makeFileName(lng), resStr + '\n');