Merge pull request #4184 from MTRNord/patch-1

Fix DeprecationWarning
This commit is contained in:
Matthew Hodgson 2017-06-04 22:55:12 +01:00 committed by GitHub
commit 8cd4bf5342

View file

@ -167,9 +167,14 @@ function genLangList() {
languages[normalizedLanguage] = {'fileName': lang.value + '.json', 'label': lang.label};
}
});
fs.writeFile('webapp/i18n/languages.json', JSON.stringify(languages, null, 4));
fs.writeFile('webapp/i18n/languages.json', JSON.stringify(languages, null, 4), function(err) {
if (err) {
console.error("Copy Error occured: " + err);
throw new Error("Failed to generate languages.json");
}
});
if (verbose) {
console.log("Generated language list");
console.log("Generated languages.json");
}
}