diff --git a/lib/core/plugin.js b/lib/core/plugin.js index 9fe984f92..7950706f0 100644 --- a/lib/core/plugin.js +++ b/lib/core/plugin.js @@ -155,12 +155,6 @@ Plugin.prototype.addProviderInit = function(providerType, code, initCondition) { this.pluginTypes.push('initCode'); }; -Plugin.prototype.runCommands = function(cmd, options) { - return this.console.map(function(cb) { - return cb.call(this, cmd, options); - }).join("\n"); -}; - Plugin.prototype.runFilePipeline = function() { var self = this; diff --git a/lib/dashboard/console.js b/lib/dashboard/console.js index be6ba7da5..d995a66e0 100644 --- a/lib/dashboard/console.js +++ b/lib/dashboard/console.js @@ -55,10 +55,10 @@ class Console { executeCmd(cmd, callback) { let plugin, pluginOutput; - let plugins = this.plugins.getPluginsFor('console'); - for (let i = 0; i < plugins.length; i++) { - plugin = plugins[i]; - pluginOutput = plugin.runCommands(cmd, {}); + + var pluginCmds = this.plugins.getPluginsProperty('console', 'console'); + for (let pluginCmd of pluginCmds) { + let pluginOutput = pluginCmd.call(this, cmd, {}); if (pluginOutput !== false && pluginOutput !== 'false') return callback(pluginOutput); }