Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from heroku/halt-on-deploy-error
Browse files Browse the repository at this point in the history
Add early return in error condition.
  • Loading branch information
ntblack authored Jun 27, 2016
2 parents 4d57f31 + 5b40d5a commit ae4af2f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const info = function(message) {
};

const error = function(message) {
console.error(` ${message}`);
console.error(` ! ${message}`);
};

const addonInfo = parseUrl(process.env.SALESFORCE_URL);
Expand All @@ -39,7 +39,10 @@ deployLocator.on('progress', function(results) {
info('polling...');
});
deployLocator.complete(true, function(err, result) {
if(err) { error(err); }
if (err) {
error(err);
return;
}
info('done ? :' + result.done);
info('success ? : ' + result.true);
info('state : ' + result.state);
Expand Down

0 comments on commit ae4af2f

Please sign in to comment.