Skip to content

Commit 3d4116d

Browse files
committed
fix(cli): remove default value from edit option #2065
move pseudo default to "main" function
1 parent 3fe8ae3 commit 3d4116d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

@commitlint/cli/src/cli.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,7 @@ test('should print help', async () => {
442442
--cwd, -d directory to execute in
443443
[string] [default: (Working Directory)]
444444
--edit, -e read last commit message from the specified file or
445-
fallbacks to ./.git/COMMIT_EDITMSG
446-
[string] [default: false]
445+
fallbacks to ./.git/COMMIT_EDITMSG [string]
447446
--env, -E check message in the file at path given by environment
448447
variable value [string]
449448
--extends, -x array of shareable configurations to extend [array]

@commitlint/cli/src/cli.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const cli = yargs
4242
},
4343
edit: {
4444
alias: 'e',
45-
default: false,
4645
description:
4746
'read last commit message from the specified file or fallbacks to ./.git/COMMIT_EDITMSG',
4847
type: 'string',
@@ -112,7 +111,7 @@ const cli = yargs
112111
)
113112
.strict();
114113

115-
main(cli.argv).catch((err) => {
114+
main({edit: false, ...cli.argv}).catch((err) => {
116115
setTimeout(() => {
117116
if (err.type === pkg.name) {
118117
process.exit(1);

0 commit comments

Comments
 (0)