From b34ddf32cf8dcee0ed0d5d60ef419d2aa984b4fa Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 18 Jun 2018 11:27:29 -0400 Subject: [PATCH] refactor pluginPath --- lib/core/plugins.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/plugins.js b/lib/core/plugins.js index 7ad0b7d5..bbf717c2 100644 --- a/lib/core/plugins.js +++ b/lib/core/plugins.js @@ -54,7 +54,7 @@ Plugins.prototype.createPlugin = function(pluginName, pluginConfig) { }; Plugins.prototype.loadInternalPlugin = function(pluginName, pluginConfig) { - var pluginPath = utils.joinPath('../modules/', pluginName, 'index.js'); + var pluginPath = fs.embarkPath('lib/modules/' + pluginName); var plugin = require(pluginPath); var pluginWrapper = new Plugin({ @@ -62,7 +62,7 @@ Plugins.prototype.loadInternalPlugin = function(pluginName, pluginConfig) { pluginModule: plugin, pluginConfig: pluginConfig || {}, logger: this.logger, - pluginPath: fs.embarkPath('lib/modules/' + pluginName), + pluginPath: pluginPath, interceptLogs: this.interceptLogs, events: this.events, config: this.config,