mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 15:24:52 +09:00
Fix plugin modules not loading
Fix the path to plugin modules using the old plugins dir instead of resolving to the actual path of the plugin, which in turn caused no plugin modules to be loaded.
This commit is contained in:
1 parent
7968d89345
commit
65f0845398
1 file changed
+2
-1
@@ -384,7 +384,8 @@ class Instance extends link.Link{
|
||||
// Find plugin modules to patch in
|
||||
let modules = new Map();
|
||||
for (let [pluginName, plugin] of this.plugins) {
|
||||
let modulePath = path.join("plugins", pluginName, "module");
|
||||
let pluginPackagePath = require.resolve(path.posix.join(plugin.info.requirePath, "package.json"));
|
||||
let modulePath = path.join(path.dirname(pluginPackagePath), "module");
|
||||
if (!await fs.pathExists(modulePath)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user