Skip to content

Commit

Permalink
fix(cli): remove default value from edit option #2065
Browse files Browse the repository at this point in the history
move pseudo default to "main" function
  • Loading branch information
escapedcat committed Sep 5, 2020
1 parent 3fe8ae3 commit 3d4116d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions @commitlint/cli/src/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,7 @@ test('should print help', async () => {
--cwd, -d directory to execute in
[string] [default: (Working Directory)]
--edit, -e read last commit message from the specified file or
fallbacks to ./.git/COMMIT_EDITMSG
[string] [default: false]
fallbacks to ./.git/COMMIT_EDITMSG [string]
--env, -E check message in the file at path given by environment
variable value [string]
--extends, -x array of shareable configurations to extend [array]
Expand Down
3 changes: 1 addition & 2 deletions @commitlint/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const cli = yargs
},
edit: {
alias: 'e',
default: false,
description:
'read last commit message from the specified file or fallbacks to ./.git/COMMIT_EDITMSG',
type: 'string',
Expand Down Expand Up @@ -112,7 +111,7 @@ const cli = yargs
)
.strict();

main(cli.argv).catch((err) => {
main({edit: false, ...cli.argv}).catch((err) => {
setTimeout(() => {
if (err.type === pkg.name) {
process.exit(1);
Expand Down

0 comments on commit 3d4116d

Please sign in to comment.