Skip to content

Commit

Permalink
fix: commander
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak committed Jun 5, 2023
1 parent 4356f57 commit 3e0b8eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
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

0 comments on commit 3e0b8eb

Please sign in to comment.