Skip to content

Commit dfb020b

Browse files
committed
feat: Set --verbose as default for check-update command
This change modifies the check-update command to have verbose mode enabled by default, while still allowing users to disable it with --no-verbose. The modification affects both the production version (commit-msg.ts) and development version (commit-msg.dev.ts) of the CLI tool. This improves the user experience by providing more detailed output by default, which is helpful for understanding what the update check is doing. 🤖 Generated with [Claude Code](https://claude.ai/code) Change-Id: Ic5c9081af2c752539f8b8994a72eea24751105ef Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
1 parent fbdbd55 commit dfb020b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/bin/commit-msg.dev.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ async function main() {
134134
program
135135
.command('check-update')
136136
.description('Check for available updates')
137-
.option('-v, --verbose', 'Enable verbose output')
137+
.option('--verbose', 'Enable verbose output', true) // Set verbose as default
138+
.option('--no-verbose', 'Disable verbose output') // Allow disabling verbose
138139
.action(async (options) => {
139140
const verbose = getVerboseMode({ ...program.opts(), ...options });
140141
const hasUpdate = await checkForUpdatesOnly(verbose);

src/bin/commit-msg.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ async function main() {
168168
program
169169
.command('check-update')
170170
.description('Check for available updates')
171-
.option('--verbose', 'Enable verbose output')
171+
.option('--verbose', 'Enable verbose output', true) // Set verbose as default
172+
.option('--no-verbose', 'Disable verbose output') // Allow disabling verbose
172173
.action(async (options) => {
173174
const verbose = getVerboseMode({ ...program.opts(), ...options });
174175
const hasUpdate = await checkForUpdatesOnly(verbose);

0 commit comments

Comments
 (0)