mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #7860, allow running single upgrade scripts from plugins
This commit is contained in:
@@ -80,7 +80,7 @@
|
|||||||
"mubsub-nbb": "^1.5.1",
|
"mubsub-nbb": "^1.5.1",
|
||||||
"nconf": "^0.10.0",
|
"nconf": "^0.10.0",
|
||||||
"nodebb-plugin-composer-default": "6.3.6",
|
"nodebb-plugin-composer-default": "6.3.6",
|
||||||
"nodebb-plugin-dbsearch": "4.0.2",
|
"nodebb-plugin-dbsearch": "4.0.3",
|
||||||
"nodebb-plugin-emoji": "^3.0.0",
|
"nodebb-plugin-emoji": "^3.0.0",
|
||||||
"nodebb-plugin-emoji-android": "2.0.0",
|
"nodebb-plugin-emoji-android": "2.0.0",
|
||||||
"nodebb-plugin-markdown": "8.10.4",
|
"nodebb-plugin-markdown": "8.10.4",
|
||||||
|
|||||||
@@ -129,12 +129,14 @@ Upgrade.runParticular = function (names, callback) {
|
|||||||
console.log('\nParsing upgrade scripts... ');
|
console.log('\nParsing upgrade scripts... ');
|
||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
async.apply(file.walk, path.join(__dirname, './upgrades')),
|
function (next) {
|
||||||
|
file.walk(path.join(__dirname, './upgrades'), next);
|
||||||
|
},
|
||||||
function (files, next) {
|
function (files, next) {
|
||||||
var upgrades = files.filter(function (file) {
|
Upgrade.appendPluginScripts(files, next);
|
||||||
return names.includes(path.basename(file, '.js'));
|
},
|
||||||
});
|
function (files, next) {
|
||||||
|
const upgrades = files.filter(file => names.includes(path.basename(file, '.js')));
|
||||||
Upgrade.process(upgrades, 0, next);
|
Upgrade.process(upgrades, 0, next);
|
||||||
},
|
},
|
||||||
], callback);
|
], callback);
|
||||||
|
|||||||
Reference in New Issue
Block a user