Allow env variable to point to specific plugin path for debugging

This commit is contained in:
advplyr 2024-12-23 16:53:47 -06:00
parent cbbdb0ec29
commit 5f680d7277
2 changed files with 11 additions and 0 deletions

View file

@ -161,6 +161,16 @@ class PluginManager {
pluginsFound.push(plugin)
}
}
if (process.env.EXTERNAL_PLUGIN_PATH) {
const pluginName = Path.basename(process.env.EXTERNAL_PLUGIN_PATH)
const plugin = await this.loadPlugin(pluginName, process.env.EXTERNAL_PLUGIN_PATH)
if (plugin) {
Logger.debug(`[PluginManager] Found external plugin "${plugin.manifest.name}"`)
pluginsFound.push(plugin)
} else {
Logger.error(`[PluginManager] External plugin not found or invalid`)
}
}
return pluginsFound
}