mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
closes #4865
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
name: 'mongo:password',
|
||||
description: 'Password of your MongoDB database',
|
||||
hidden: true,
|
||||
default: nconf.get('mongo:password') || '',
|
||||
before: function(value) { value = value || nconf.get('mongo:password') || ''; return value; }
|
||||
},
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
name: 'redis:password',
|
||||
description: 'Password of your Redis database',
|
||||
hidden: true,
|
||||
default: nconf.get('redis:password') || '',
|
||||
before: function(value) { value = value || nconf.get('redis:password') || ''; return value; }
|
||||
},
|
||||
{
|
||||
|
||||
@@ -43,8 +43,8 @@ questions.optional = [
|
||||
];
|
||||
|
||||
function checkSetupFlag(next) {
|
||||
var envSetupKeys = ['database'],
|
||||
setupVal;
|
||||
var setupVal;
|
||||
|
||||
try {
|
||||
if (nconf.get('setup')) {
|
||||
setupVal = JSON.parse(nconf.get('setup'));
|
||||
@@ -74,14 +74,10 @@ function checkSetupFlag(next) {
|
||||
|
||||
process.exit();
|
||||
}
|
||||
} else if (envSetupKeys.every(function(key) {
|
||||
return nconf.stores.env.store.hasOwnProperty(key);
|
||||
})) {
|
||||
install.values = envSetupKeys.reduce(function(config, key) {
|
||||
config[key] = nconf.stores.env.store[key];
|
||||
return config;
|
||||
}, {});
|
||||
|
||||
} else if (nconf.get('database')) {
|
||||
install.values = {
|
||||
database: nconf.get('database')
|
||||
};
|
||||
next();
|
||||
} else {
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user