Create installed_plugins.json even if no plugin is installed
parent
4863f10d24
commit
58e1f60ef2
|
@ -42,6 +42,7 @@ const migratePluginsFromNodeModules = async () => {
|
||||||
// that are not included in `package.json` (which is expected to not exist).
|
// that are not included in `package.json` (which is expected to not exist).
|
||||||
const cmd = ['npm', 'ls', '--long', '--json', '--depth=0', '--no-production'];
|
const cmd = ['npm', 'ls', '--long', '--json', '--depth=0', '--no-production'];
|
||||||
const {dependencies = {}} = JSON.parse(await runCmd(cmd, {stdio: [null, 'string']}));
|
const {dependencies = {}} = JSON.parse(await runCmd(cmd, {stdio: [null, 'string']}));
|
||||||
|
await persistInstalledPlugins();
|
||||||
await Promise.all(Object.entries(dependencies).map(async ([pkg, info]) => {
|
await Promise.all(Object.entries(dependencies).map(async ([pkg, info]) => {
|
||||||
if (pkg.startsWith(plugins.prefix) && pkg !== 'ep_etherpad-lite') {
|
if (pkg.startsWith(plugins.prefix) && pkg !== 'ep_etherpad-lite') {
|
||||||
await exports.install(pkg)
|
await exports.install(pkg)
|
||||||
|
|
Loading…
Reference in New Issue