removing the bit of code that disables plugins if the minver does not satisfy (too annoying imo)... now that we have ./nodebb reset, this is moot

v1.18.x
Julian Lam
parent 4567e5fbd0
commit c7274e11d0

@ -114,20 +114,7 @@ var fs = require('fs'),
if (pluginData.minver && semver.validRange(pluginData.minver)) {
if (!semver.satisfies(pkg.version, pluginData.minver)) {
// If NodeBB is not new enough to run this plugin
if (process.env.NODE_ENV === 'development') {
// Throw a warning in development, but do nothing else
winston.warn('[plugins/' + pluginData.id + '] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing.');
} else {
if (nconf.get('check-plugins') !== false) {
// Refuse to load this plugin...
winston.error('[plugins/' + pluginData.id + '] This plugin is reportedly incompatible with your version of NodeBB, so it has been disabled.');
winston.error('[plugins/' + pluginData.id + '] Use `--no-check-plugins` if you wish to live dangerously.');
// ... and disable it, too
Plugins.toggleActive(pluginData.id);
return callback();
}
}
winston.warn('[plugins/' + pluginData.id + '] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing.');
}
}

Loading…
Cancel
Save