mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 00:46:16 -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
|
@ -4,9 +4,12 @@
|
|||
// unhandled rejection into an uncaught exception, which does cause Node.js to exit.
|
||||
process.on('unhandledRejection', (err) => { throw err; });
|
||||
|
||||
const npm = require('ep_etherpad-lite/node_modules/npm');
|
||||
const util = require('util');
|
||||
|
||||
require('ep_etherpad-lite/node_modules/npm').load({}, async (er, npm) => {
|
||||
(async () => {
|
||||
await util.promisify(npm.load)({});
|
||||
|
||||
process.chdir(`${npm.root}/..`);
|
||||
|
||||
// This script requires that you have modified your settings.json file
|
||||
|
@ -56,4 +59,4 @@ require('ep_etherpad-lite/node_modules/npm').load({}, async (er, npm) => {
|
|||
|
||||
await util.promisify(db.close.bind(db))();
|
||||
console.log('Finished.');
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue