mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-16 19:24:53 -04:00
bin scripts: Promisify npm.load
This commit is contained in:
parent
92cd2cc760
commit
efdcaae526
7 changed files with 39 additions and 23 deletions
|
@ -18,8 +18,10 @@ const padId = process.argv[2];
|
|||
let valueCount = 0;
|
||||
|
||||
const npm = require('ep_etherpad-lite/node_modules/npm');
|
||||
npm.load({}, async (err) => {
|
||||
if (err) throw err;
|
||||
const util = require('util');
|
||||
|
||||
(async () => {
|
||||
await util.promisify(npm.load)({});
|
||||
|
||||
// intialize database
|
||||
require('ep_etherpad-lite/node/utils/Settings');
|
||||
|
@ -56,4 +58,4 @@ npm.load({}, async (err) => {
|
|||
}
|
||||
|
||||
console.info(`Finished: Replaced ${valueCount} values in the database`);
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue