stop on error

This commit is contained in:
Jonathan Rainville 2018-09-12 12:04:33 -04:00
parent 9f7a932252
commit 4c912b8ecf
1 changed files with 4 additions and 4 deletions

View File

@ -62,6 +62,7 @@ class DeployManager {
self.events.request('deploy:contract', contract, (err) => { self.events.request('deploy:contract', contract, (err) => {
if (err) { if (err) {
contract.error = err.message || err; contract.error = err.message || err;
self.logger.error(err.message || err);
errors.push(err); errors.push(err);
} }
callback(); callback();
@ -80,10 +81,9 @@ class DeployManager {
try { try {
async.auto(contractDeploys, function(_err, _results) { async.auto(contractDeploys, function(_err, _results) {
if (errors.length) { if (errors.length) {
self.logger.error(__("error deploying contracts")); _err = __("Error deploying contracts. Please fix errors to continue.");
errors.forEach(error => { self.logger.error(_err);
self.logger.error(error.message || error); return done(_err);
});
} }
if (contracts.length === 0) { if (contracts.length === 0) {
self.logger.info(__("no contracts found")); self.logger.info(__("no contracts found"));