mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 20:45:58 +01:00
updated install script to accept environment variables
updated upgrade script to execute callback when present updated install script to not fire upgrades unless necessary updated install script to write directly to console, and not through winston if a password is not provided, one is auto-generated
This commit is contained in:
@@ -971,23 +971,25 @@ Upgrade.upgrade = function(callback) {
|
||||
} else {
|
||||
winston.info('[upgrade] Schema already up to date!');
|
||||
}
|
||||
|
||||
process.exit();
|
||||
} else {
|
||||
switch(err.message) {
|
||||
case 'upgrade-not-possible':
|
||||
winston.error('[upgrade] NodeBB upgrade could not complete, as your database schema is too far out of date.');
|
||||
winston.error('[upgrade] Please ensure that you did not skip any minor version upgrades.');
|
||||
winston.error('[upgrade] (e.g. v0.1.x directly to v0.3.x)');
|
||||
process.exit();
|
||||
break;
|
||||
|
||||
default:
|
||||
winston.error('[upgrade] Errors were encountered while updating the NodeBB schema: ' + err.message);
|
||||
process.exit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof callback === 'function') {
|
||||
callback(err);
|
||||
} else {
|
||||
process.exit();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user