Skip to content

Node.js based forum software built for the modern web

fix: #7860, allow running single upgrade scripts from plugins

Barış Soner Uşaklıa4dec7e3ab8e
diff --git a/install/package.json b/install/package.json
index 16594b75b7..be133f04bb 100644
--- a/install/package.json
+++ b/install/package.json
@@ -80,7 +80,7 @@
"mubsub-nbb": "^1.5.1",
"nconf": "^0.10.0",
"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-android": "2.0.0",
"nodebb-plugin-markdown": "8.10.4",
diff --git a/src/upgrade.js b/src/upgrade.js
index 9ab3084067..128c9a9602 100644
--- a/src/upgrade.js
+++ b/src/upgrade.js
@@ -129,12 +129,14 @@ Upgrade.runParticular = function (names, callback) {
console.log('\nParsing upgrade scripts... ');
async.waterfall([
- async.apply(file.walk, path.join(__dirname, './upgrades')),
+ function (next) {
+ file.walk(path.join(__dirname, './upgrades'), next);
+ },
function (files, next) {
- var upgrades = files.filter(function (file) {
- return names.includes(path.basename(file, '.js'));
- });
-
+ Upgrade.appendPluginScripts(files, next);
+ },
+ function (files, next) {
+ const upgrades = files.filter(file => names.includes(path.basename(file, '.js')));
Upgrade.process(upgrades, 0, next);
},
], callback);