From eb3bebad0a63fef2739ffcfb890f2a9d49c2dd99 Mon Sep 17 00:00:00 2001 From: Gabe Date: Sat, 12 Aug 2023 12:46:41 +0100 Subject: [PATCH] do not load plugins if none exist --- src/proxy/pluginLoader/PluginManager.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/proxy/pluginLoader/PluginManager.ts b/src/proxy/pluginLoader/PluginManager.ts index 81c6bc9..2ae88af 100644 --- a/src/proxy/pluginLoader/PluginManager.ts +++ b/src/proxy/pluginLoader/PluginManager.ts @@ -59,13 +59,14 @@ export class PluginManager extends EventEmitter { } pluginsString = pluginsString.substring(0, pluginsString.length - 1); this._logger.info(`Found ${pluginMeta.size} plugin(s): ${pluginsString}`); - - this._logger.info(`Loading ${pluginMeta.size} plugin(s)...`); - const successLoadCount = await this._loadPlugins( - pluginMeta, - this._getLoadOrder(pluginMeta) - ); - this._logger.info(`Successfully loaded ${successLoadCount} plugin(s).`); + if(pluginMeta.size !== 0){ + this._logger.info(`Loading ${pluginMeta.size} plugin(s)...`); + const successLoadCount = await this._loadPlugins( + pluginMeta, + this._getLoadOrder(pluginMeta) + ); + this._logger.info(`Successfully loaded ${successLoadCount} plugin(s).`); + } this.emit("pluginsFinishLoading", this); }