From d60b3a021ddbc2ebb351adb5d742461a5a31c364 Mon Sep 17 00:00:00 2001
From: escapedcat <github@htmlcss.de>
Date: Mon, 17 Dec 2018 18:14:49 +0100
Subject: [PATCH] fix(cli): avoid linebreak in empty input

---
 @commitlint/cli/src/cli.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/@commitlint/cli/src/cli.js b/@commitlint/cli/src/cli.js
index 8109af9997..d94b942ff6 100755
--- a/@commitlint/cli/src/cli.js
+++ b/@commitlint/cli/src/cli.js
@@ -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)) {