mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 23:33:13 +09:00
Skip loading plugins without entrypoint on hosts
If a plugin only has entrypoints at the controller level the config will skip adding a "load_plugin" config option for the given plugin to avoid making options that do nothing. If such a plugin is added to a host it will still reach loadPlugin which in turn tries to check the load_plugin config and throw an error on startup due the field being missing. Skip trying to load plugins without an entrypoint at the instance or host level in hosts before checking the load_plugin config field.
This commit is contained in:
1 parent
1d1e80fbf0
commit
2872faab98
2 files changed
+5
-1
No files matched your search
@@ -377,7 +377,10 @@ export default class Host extends lib.Link {
|
||||
|
||||
async loadPlugins() {
|
||||
for (let pluginInfo of this.pluginInfos) {
|
||||
if (!this.config.get(`${pluginInfo.name}.load_plugin` as keyof lib.HostConfigFields)) {
|
||||
if (
|
||||
!pluginInfo.hostEntrypoint && !pluginInfo.instanceEntrypoint
|
||||
|| !this.config.get(`${pluginInfo.name}.load_plugin` as keyof lib.HostConfigFields)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user