Skip to content

Commit

Permalink
fix(cli): avoid linebreak in empty input
Browse files Browse the repository at this point in the history
  • Loading branch information
escapedcat committed Jan 2, 2019
1 parent e23839c commit d60b3a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions @commitlint/cli/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ async function main(options) {

const messages = (Array.isArray(input) ? input : [input])
.filter(message => typeof message === 'string')
.filter(message => message.trim() !== '')
.filter(Boolean);

if (messages.length === 0 && !checkFromRepository(flags)) {
Expand Down

0 comments on commit d60b3a0

Please sign in to comment.