diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index aefe81604..86952fc27 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -156,7 +156,7 @@ Blockchain.prototype.run = function() { } }); self.child.stdout.on('data', (data) => { - console.log(`Geth error: ${data}`); + console.error(`Geth error: ${data}`); }); // Geth logs appear in stderr somehow self.child.stderr.on('data', (data) => { diff --git a/lib/index.js b/lib/index.js index 71b40b343..f2dd51002 100644 --- a/lib/index.js +++ b/lib/index.js @@ -34,18 +34,13 @@ class Embark { this.plugins = this.config.plugins; } - isDev(env) { - if (this.config && this.config.blockchainConfig && this.config.blockchainConfig.isDev) { - return true; - } else if (this.config && this.config.blockchainConfig && this.config.blockchainConfig.isDev === false) { - return false; - } - return (env === 'development'); + isDev() { + return this.config && this.config.blockchainConfig && this.config.blockchainConfig.isDev; } blockchain(env, client) { this.context = [constants.contexts.blockchain]; - return require('./cmds/blockchain/blockchain.js')(this.config.blockchainConfig, client, env, this.isDev(env)).run(); + return require('./cmds/blockchain/blockchain.js')(this.config.blockchainConfig, client, env, this.isDev()).run(); } simulator(options) { @@ -75,7 +70,7 @@ class Embark { env: options.env, client: options.client, locale: options.locale, - isDev: this.isDev(options.env), + isDev: this.isDev(), version: this.version, embarkConfig: options.embarkConfig || 'embark.json', logFile: options.logFile, @@ -170,7 +165,7 @@ class Embark { env: options.env, client: options.client, locale: options.locale, - isDev: this.isDev(options.env), + isDev: this.isDev(), version: this.version, embarkConfig: 'embark.json', interceptLogs: false, @@ -242,7 +237,7 @@ class Embark { const Engine = require('./core/engine.js'); const engine = new Engine({ env: options.env, - isDev: this.isDev(options.env), + isDev: this.isDev(), version: this.version, embarkConfig: options.embarkConfig || 'embark.json', logFile: options.logFile, @@ -297,7 +292,7 @@ class Embark { env: options.env, client: options.client, locale: options.locale, - isDev: this.isDev(options.env), + isDev: this.isDev(), version: this.version, embarkConfig: 'embark.json', interceptLogs: false,