Skip to content

Commit b1b613d

Browse files
committed
fix: use --pretty=format:"%B" instead of --pretty=%B
The latter adds unnecessary whitespace at the end of the commit msg.
1 parent 06a3ed8 commit b1b613d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

@commitlint/read/src/read.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ export default async function getCommitMessages(
2626
}
2727

2828
if (last) {
29-
const executeGitCommand = await execa('git', ['log', '-1', '--pretty=%B']);
29+
const executeGitCommand = await execa('git', [
30+
'log',
31+
'-1',
32+
'--pretty=format:"%B"',
33+
]);
3034
return [executeGitCommand.stdout];
3135
}
3236

0 commit comments

Comments
 (0)