Skip to content

Single --version, --help (or shorthands) are swallowed up by cdo #17

@dotboris

Description

@dotboris

When I call cdo some-dir echo --version I would expect to see --version as the output but instead, I see cdo's version output. This is true for all the following:

$ cdo some-dir echo --version
cdo 0.1.0

$ cdo some-dir echo -V
cdo 0.1.0

$ cdo some-dir echo --help
Runs a command in the given directory

Usage: cdo <DIRECTORY> <COMMAND> [ARGS]...

Arguments:
  <DIRECTORY>  The directory to run the command in
  <COMMAND>    The command to run
  [ARGS]...    The arguments to pass to the command

Options:
  -h, --help     Print help
  -V, --version  Print version

$ cdo some-dir echo -h
Runs a command in the given directory

Usage: cdo <DIRECTORY> <COMMAND> [ARGS]...

Arguments:
  <DIRECTORY>  The directory to run the command in
  <COMMAND>    The command to run
  [ARGS]...    The arguments to pass to the command

Options:
  -h, --help     Print help
  -V, --version  Print version

What's interesting is that when I pass a flag before one of those, it behaves as expected. So this works fine:

$ cdo src echo --foo --version
--foo --version

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions