Skip to content

Commit 6bd2de8

Browse files
committed
fix(cli): avoid linebreak in empty input
#511
1 parent e23839c commit 6bd2de8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

@commitlint/cli/src/cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ async function main(options) {
121121

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

124-
const messages = (Array.isArray(input) ? input : [input])
124+
const messages = (Array.isArray(input) ? input : [input.trimEnd()])
125125
.filter(message => typeof message === 'string')
126126
.filter(Boolean);
127127

0 commit comments

Comments
 (0)