From 78d1edc1579b93839afe886c0bf374f8e82fe505 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Wed, 13 Mar 2024 17:32:14 +0100 Subject: [PATCH] fix: use --pretty=format:"%B" instead of --pretty=%B The latter adds unnecessary whitespace at the end of the commit msg. --- @commitlint/read/src/read.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/@commitlint/read/src/read.ts b/@commitlint/read/src/read.ts index 7c1531bffe6..691b442cb92 100644 --- a/@commitlint/read/src/read.ts +++ b/@commitlint/read/src/read.ts @@ -26,7 +26,7 @@ export default async function getCommitMessages( } if (last) { - const executeGitCommand = await execa('git', ['log', '-1', '--pretty=%B']); + const executeGitCommand = await execa('git', ['log', '-1', '--pretty=format:"%B"']); return [executeGitCommand.stdout]; }