Skip to content

Commit 3d71cd3

Browse files
committed
fix: always normalize flags fully
1 parent 6c96f05 commit 3d71cd3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

@commitlint/cli/src/cli.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,13 @@ async function main(options) {
9191
}
9292
}
9393

94-
function normalizeFlags(flags) {
94+
function normalizeFlags(raw) {
95+
const flags = merge({}, raw);
96+
9597
// The `edit` flag is either a boolean or a string but we are only allowed
9698
// to specify one of them in minimist
9799
if (flags.edit === '') {
98-
return merge({}, flags, {edit: true, e: true});
100+
merge(flags, {edit: true, e: true});
99101
}
100102

101103
if (!('format' in flags)) {

0 commit comments

Comments
 (0)