From d3f174a57fa03b4a2e722f7bbbca2d8b55782149 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 10 Feb 2017 20:50:21 -0800 Subject: [PATCH] ci: fix validate-commit-messages --- tools/gulp-tasks/validate-commit-message.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/gulp-tasks/validate-commit-message.js b/tools/gulp-tasks/validate-commit-message.js index 1f24b3618e..a0ce47f596 100644 --- a/tools/gulp-tasks/validate-commit-message.js +++ b/tools/gulp-tasks/validate-commit-message.js @@ -14,7 +14,11 @@ module.exports = (gulp) => () => { let someCommitsInvalid = false; let commitsByLine = stdout.trim().split(/\n/); - + for (var i = 0; i < commitsByLine.length; i++) { + if (!commitsByLine[i]) { + commitsByLine.splice(i, 1); + } + } console.log(`Examining ${commitsByLine.length} commits between HEAD and master`); if (commitsByLine.length == 0) {