Skip to content

Node.js based forum software built for the modern web

feat: show error if json is invalid

Barış Soner Uşaklı153456278b53
diff --git a/src/install.js b/src/install.js
index 29a4e2bba1..0b5dd62d39 100644
--- a/src/install.js
+++ b/src/install.js
@@ -54,7 +54,9 @@ function checkSetupFlag(next) {
if (nconf.get('setup')) {
setupVal = JSON.parse(nconf.get('setup'));
}
- } catch (err) {}
+ } catch (err) {
+ winston.error('Invalid json in nconf.get(\'setup\'), ignoring setup values');
+ }
if (setupVal && typeof setupVal === 'object') {
if (setupVal['admin:username'] && setupVal['admin:password'] && setupVal['admin:password:confirm'] && setupVal['admin:email']) {