Skip to content

Commit

Permalink
160431789 Pass plugin dirs names to plugin loader
Browse files Browse the repository at this point in the history
Pass all the plugin dir names to gateway's plugin loaders.
  • Loading branch information
gaonkar18y authored and keyurkarnik committed Aug 20, 2020
1 parent 2c1a745 commit ce23be1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/lib/gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Gateway.prototype.start = (options,cb) => {
delete args.keys;
//set pluginDir
if (!args.pluginDir) {
if (config.edgemicro.plugins.dir) {
if (config.edgemicro.plugins && config.edgemicro.plugins.dir) {
args.pluginDir = path.resolve(config.edgemicro.plugins.dir);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Plugins.prototype.loadPlugins = function () {
plugin = isBuiltIn;
}

gateway.addPlugin(pluginName, _.bind(plugin.init, plugin));
gateway.addPlugin(pluginName, _.bind(plugin.init, plugin), combinedDirs);
});

}
Expand Down

0 comments on commit ce23be1

Please sign in to comment.