only put isDev when specifically set

This commit is contained in:
Jonathan Rainville 2018-06-27 14:29:31 -04:00 committed by Iuri Matias
parent cf403df1fb
commit fcbd4739dc
2 changed files with 7 additions and 12 deletions

View File

@ -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) => {

View File

@ -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,