only put isDev when specifically set

This commit is contained in:
Jonathan Rainville 2018-06-27 14:29:31 -04:00
parent 1c801bc10f
commit 95b20e2db9
2 changed files with 8 additions and 13 deletions

View File

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

View File

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