From fcbd4739dc4b4c8886cdfa0daf0f145c973debbb Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 27 Jun 2018 14:29:31 -0400 Subject: [PATCH] only put isDev when specifically set --- lib/cmds/blockchain/blockchain.js | 2 +- lib/index.js | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index 3250439b..a58a2329 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 c182bcfd..86b07bac 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,