diff --git a/lib/dashboard/console.js b/lib/dashboard/console.js index 44d6dec9..1472be79 100644 --- a/lib/dashboard/console.js +++ b/lib/dashboard/console.js @@ -39,29 +39,23 @@ class Console { for (let pluginCmd of pluginCmds) { let pluginOutput = pluginCmd.call(this, cmd, {}); //console.log("plugin output: ", pluginOutput) - if (pluginOutput !== false && pluginOutput !== 'false') + if (pluginOutput !== false && pluginOutput !== 'false' && pluginOutput !== undefined) return callback(pluginOutput); - else if (pluginOutput === undefined) - return; } //console.log("Do we hit the here?") let output = this.processEmbarkCmd(cmd); - console.log("Output: ", output); if (output) { return callback(output); } - console.log("What about the here?") + try { let result = RunCode.doEval(cmd); - console.log("RESULT: ", result) return callback(result); } catch (e) { if (e.message.indexOf('not defined') > 0) { - console.log("Hit here in indexOf") return callback(("error: " + e.message).red + ("\n" + __("Type") + " " + "help".bold + " " + __("to see the list of available commands")).cyan); } else { - console.log("Still hit the catch") return callback(e.message); } } diff --git a/lib/dashboard/monitor.js b/lib/dashboard/monitor.js index 53181887..56bcd039 100644 --- a/lib/dashboard/monitor.js +++ b/lib/dashboard/monitor.js @@ -367,9 +367,8 @@ class Dashboard { executeCmd(cmd, cb) { const self = this; self.logText.log('console> '.bold.green + cmd); - self.console.executeCmd(cmd, function (result) { - if (result !== undefined) - self.logText.log(result); + self.console.executeCmd(cmd, function (result) { + self.logText.log(result); if (cb) { cb(result); }