fix(dev-infra): exit non-zero if commit message validation failed (#36723)

Currently the `commit-message` validation script does not exit
with a non-zero exit code if the commit message validation failed.

This means that invalid commit messages are currently not
causing CI to be red. See: https://circleci.com/gh/angular/angular/686008

PR Close #36723
This commit is contained in:
Paul Gschwendtner 2020-04-20 19:42:09 +02:00 committed by Matias Niemelä
parent b5e92b9a5d
commit 4341743b4a

View File

@ -39,7 +39,12 @@ export function validateCommitRange(range: string) {
};
return validateCommitMessage(m, options);
});
if (allCommitsInRangeValid) {
console.info('√ All commit messages in range valid.');
} else {
// Exit with a non-zero exit code if invalid commit messages have
// been discovered.
process.exit(1);
}
}