diff --git a/@commitlint/cli/src/cli.test.ts b/@commitlint/cli/src/cli.test.ts index 4b50e446b9..2219772327 100644 --- a/@commitlint/cli/src/cli.test.ts +++ b/@commitlint/cli/src/cli.test.ts @@ -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] diff --git a/@commitlint/cli/src/cli.ts b/@commitlint/cli/src/cli.ts index e1d7b5bfb5..950521817c 100644 --- a/@commitlint/cli/src/cli.ts +++ b/@commitlint/cli/src/cli.ts @@ -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', @@ -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);