fix console cmds api
This commit is contained in:
parent
b29e865cd6
commit
411ed41c84
|
@ -155,12 +155,6 @@ Plugin.prototype.addProviderInit = function(providerType, code, initCondition) {
|
||||||
this.pluginTypes.push('initCode');
|
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() {
|
Plugin.prototype.runFilePipeline = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
|
|
@ -55,10 +55,10 @@ class Console {
|
||||||
|
|
||||||
executeCmd(cmd, callback) {
|
executeCmd(cmd, callback) {
|
||||||
let plugin, pluginOutput;
|
let plugin, pluginOutput;
|
||||||
let plugins = this.plugins.getPluginsFor('console');
|
|
||||||
for (let i = 0; i < plugins.length; i++) {
|
var pluginCmds = this.plugins.getPluginsProperty('console', 'console');
|
||||||
plugin = plugins[i];
|
for (let pluginCmd of pluginCmds) {
|
||||||
pluginOutput = plugin.runCommands(cmd, {});
|
let pluginOutput = pluginCmd.call(this, cmd, {});
|
||||||
if (pluginOutput !== false && pluginOutput !== 'false') return callback(pluginOutput);
|
if (pluginOutput !== false && pluginOutput !== 'false') return callback(pluginOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue