diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index 3250439b5..a58a2329f 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -165,7 +165,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 c182bcfd5..86b07bacf 100644 --- a/lib/index.js +++ b/lib/index.js @@ -30,13 +30,8 @@ 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) { @@ -71,7 +66,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, @@ -167,7 +162,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, @@ -239,7 +234,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, @@ -294,7 +289,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,