Skip to content

Commit

Permalink
report bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur-kushwaha committed Feb 14, 2018
1 parent 04ff2ef commit f201fa6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/lifecycles/analyzeCommits.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = function () {
}).then(commits => {
return Promise.all(commits.map(check))
}).then(tasks => {
var hasErrors=false;
for(var task of tasks){
console.log(chalk.blue(task.commit));
for(var i in task.report.errors){
Expand All @@ -34,9 +35,11 @@ module.exports = function () {
console.log(chalk.yellow('Warning '+(+i+1)+'.',task.report.warnings[i].message));
}
console.log(chalk.black('------------------------'));
if(task.report.errors.length){
hasErrors=true;
}
}

if(task.report.errors.length){
if(hasErrors){
return Promise.reject({
message:"ERRORS: Invalid commits"
});
Expand Down

0 comments on commit f201fa6

Please sign in to comment.