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 Dec 17, 2018
1 parent e23839c commit 6bd2de8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion @commitlint/cli/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ async function main(options) {

const input = await (fromStdin ? stdin() : read(range, {cwd: flags.cwd}));

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

Expand Down

0 comments on commit 6bd2de8

Please sign in to comment.