fixing upgrade text to use nodebb executable, removed exposure of option to run without upgrading

v1.18.x
Julian Lam 11 years ago
parent 740c336480
commit f5f84d9946

@ -73,7 +73,7 @@ if (nconf.get('config')) {
} }
configExists = fs.existsSync(configFile); configExists = fs.existsSync(configFile);
if (!nconf.get('help') && !nconf.get('setup') && !nconf.get('install') && !nconf.get('upgrade') && !nconf.get('reset') && configExists) { if (!nconf.get('setup') && !nconf.get('install') && !nconf.get('upgrade') && !nconf.get('reset') && configExists) {
start(); start();
} else if (nconf.get('setup') || nconf.get('install') || !configExists) { } else if (nconf.get('setup') || nconf.get('install') || !configExists) {
setup(); setup();
@ -81,8 +81,6 @@ if (!nconf.get('help') && !nconf.get('setup') && !nconf.get('install') && !nconf
upgrade(); upgrade();
} else if (nconf.get('reset')) { } else if (nconf.get('reset')) {
reset(); reset();
} else {
displayHelp();
} }
function loadConfig() { function loadConfig() {
@ -167,7 +165,7 @@ function start() {
case 'css-propagate': case 'css-propagate':
meta.css.cache = message.cache; meta.css.cache = message.cache;
meta.css.acpCache = message.acpCache; meta.css.acpCache = message.acpCache;
winston.info('[cluster] Stylesheet propagated to worker ' + cluster.worker.id); winston.info('[cluster] Stylesheets propagated to worker ' + cluster.worker.id);
break; break;
} }
}); });
@ -181,11 +179,13 @@ function start() {
}); });
} else { } else {
winston.warn('Your NodeBB schema is out-of-date. Please run the following command to bring your dataset up to spec:'); winston.warn('Your NodeBB schema is out-of-date. Please run the following command to bring your dataset up to spec:');
winston.warn(' node app --upgrade'); winston.warn(' ./nodebb upgrade');
winston.warn('To ignore this error (not recommended):'); if (cluster.isWorker) {
winston.warn(' node app --no-check-schema'); cluster.worker.kill();
} else {
process.exit(); process.exit();
} }
}
}); });
}); });
}); });
@ -356,15 +356,3 @@ function restart() {
shutdown(1); shutdown(1);
} }
} }
function displayHelp() {
winston.info('Usage: node app [options] [arguments]');
winston.info(' [NODE_ENV=development | NODE_ENV=production] node app [--start] [arguments]');
winston.info('');
winston.info('Options:');
winston.info(' --help displays this usage information');
winston.info(' --setup configure your environment and setup NodeBB');
winston.info(' --upgrade upgrade NodeBB, first read: https://docs.nodebb.org/en/latest/upgrading/');
winston.info(' --reset soft resets NodeBB; disables all plugins and restores selected theme to Vanilla');
winston.info(' --start manually start NodeBB (default when no options are given)');
}

Loading…
Cancel
Save