don't exit if blockchain is not available

This commit is contained in:
Iuri Matias 2017-02-26 14:56:43 -05:00
parent a153859caf
commit 0060dbe53f
1 changed files with 3 additions and 6 deletions

View File

@ -34,12 +34,9 @@ DeployManager.prototype.deployContracts = function(done) {
web3.setProvider(new web3.providers.HttpProvider(web3Endpoint));
if (!web3.isConnected()) {
console.log(("Couldn't connect to " + web3Endpoint.underline + " are you sure it's on?").red);
console.log("make sure you have an ethereum node or simulator running. e.g 'embark blockchain'".magenta);
// ===================================
// TODO: should throw exception instead
// ===================================
process.exit();
self.logger.error(("Couldn't connect to " + web3Endpoint.underline + " are you sure it's on?").red);
self.logger.info("make sure you have an ethereum node or simulator running. e.g 'embark blockchain'".magenta);
return callback(Error("error connecting to blockchain node"));
}
web3.eth.getAccounts(function(err, accounts) {