From 422581352321002089fb598b0990826e0dbcbc22 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 4 Jun 2017 12:36:14 +0200 Subject: [PATCH] Fix DeprecationWarning the copy-res.js did throw "(node:8688) DeprecationWarning: Calling an asynchronous function without callback is deprecated." before --- scripts/copy-res.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/copy-res.js b/scripts/copy-res.js index 9c0e97d50e..1a35d5ae50 100755 --- a/scripts/copy-res.js +++ b/scripts/copy-res.js @@ -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"); } }