v1.18.x
barisusakli 9 years ago
parent f222adb0a3
commit 7f041a756d

@ -33,6 +33,7 @@
name: 'mongo:password', name: 'mongo:password',
description: 'Password of your MongoDB database', description: 'Password of your MongoDB database',
hidden: true, hidden: true,
default: nconf.get('mongo:password') || '',
before: function(value) { value = value || nconf.get('mongo:password') || ''; return value; } before: function(value) { value = value || nconf.get('mongo:password') || ''; return value; }
}, },
{ {

@ -25,6 +25,7 @@
name: 'redis:password', name: 'redis:password',
description: 'Password of your Redis database', description: 'Password of your Redis database',
hidden: true, hidden: true,
default: nconf.get('redis:password') || '',
before: function(value) { value = value || nconf.get('redis:password') || ''; return value; } before: function(value) { value = value || nconf.get('redis:password') || ''; return value; }
}, },
{ {

@ -43,8 +43,8 @@ questions.optional = [
]; ];
function checkSetupFlag(next) { function checkSetupFlag(next) {
var envSetupKeys = ['database'], var setupVal;
setupVal;
try { try {
if (nconf.get('setup')) { if (nconf.get('setup')) {
setupVal = JSON.parse(nconf.get('setup')); setupVal = JSON.parse(nconf.get('setup'));
@ -74,14 +74,10 @@ function checkSetupFlag(next) {
process.exit(); process.exit();
} }
} else if (envSetupKeys.every(function(key) { } else if (nconf.get('database')) {
return nconf.stores.env.store.hasOwnProperty(key); install.values = {
})) { database: nconf.get('database')
install.values = envSetupKeys.reduce(function(config, key) { };
config[key] = nconf.stores.env.store[key];
return config;
}, {});
next(); next();
} else { } else {
next(); next();

Loading…
Cancel
Save