feat(xo-server): move plugin lookup paths to config
This commit is contained in:
parent
8ff861e2be
commit
cd753acff7
@ -155,6 +155,7 @@ level = 'info'
|
||||
[logs.transport.console]
|
||||
|
||||
[plugins]
|
||||
lookupPaths = ['./node_modules', '/usr/local/lib/node_modules']
|
||||
|
||||
[remoteOptions]
|
||||
mountsDir = '/run/xo-server/mounts'
|
||||
|
@ -405,7 +405,7 @@ async function findPluginsInPath(path, prefix) {
|
||||
|
||||
async function registerPlugins(xo) {
|
||||
const pluginPaths = new Map()
|
||||
for (const path of [new URL('../node_modules', import.meta.url).pathname, '/usr/local/lib/node_modules']) {
|
||||
for (const path of xo.config.get('plugins.lookupPaths')) {
|
||||
await findPluginsInPath.call(pluginPaths, `${path}/@xen-orchestra`, 'server-')
|
||||
await findPluginsInPath.call(pluginPaths, path, 'xo-server-')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user