fix console cmds api

This commit is contained in:
Iuri Matias 2017-12-29 18:21:36 -05:00
parent b29e865cd6
commit 411ed41c84
2 changed files with 4 additions and 10 deletions

View File

@ -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;

View File

@ -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);
}