Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: always add --verbose to the command #1953

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion __e2e__/__snapshots__/default.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ exports[`shows up help information without passing in any args 1`] = `

Options:
-v Output the current version
--verbose Increase logging verbosity
-h, --help display help for command

Commands:
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const pkgJson = require('../package.json');
const program = new CommanderCommand()
.usage('[command] [options]')
.version(pkgJson.version, '-v', 'Output the current version')
.option('--verbose', 'Increase logging verbosity')
.enablePositionalOptions();

const handleError = (err: Error) => {
Expand Down Expand Up @@ -85,6 +84,7 @@ function attachCommand<C extends Command<boolean>>(
): void {
const cmd = program
.command(command.name)
.option('--verbose', 'Increase logging verbosity')
.action(async function handleAction(
this: CommanderCommand,
...args: string[]
Expand Down