diff --git a/lib/modules/console/index.js b/lib/modules/console/index.js index 2ad53b9f..00fef4b2 100644 --- a/lib/modules/console/index.js +++ b/lib/modules/console/index.js @@ -32,6 +32,9 @@ class Console { let plugin = this.plugins.createPlugin('consoleApi', {}); plugin.registerAPICall('post', '/embark-api/command', (req, res) => { this.executeCmd(req.body.command, (_err, result) => { + if (typeof result === 'string') { + return res.send({result}); + } res.send({result: stringify(result, null, 2)}); }); });