Merge pull request #20 from GabeeCoding/master

do not load plugins if none exist
This commit is contained in:
q13x 2023-08-12 19:56:27 -07:00 committed by GitHub
commit 99b8d4ee3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}