ostreedev / ostree

Operating system and container binary deployment and upgrades
https://ostreedev.github.io/ostree/
Other
1.31k stars 300 forks source link

OSTree subcommand handler passes subcommand to itself #3321

Open Thesola10 opened 1 month ago

Thesola10 commented 1 month ago

Like Git, the ostree command will look for a named command ostree-$subcommand in PATH when invoked with a subcommand it doesn't know. Unlike Git however, it passes its entire set of arguments, including the subcommand as argv[1], to the child program.

What should happen, with ostree-ext-cli as an example:

$ ostree ext-cli
ostree-ext
Toplevel options for extended ostree functionality
...

What actually happens:

$ ostree ext-cli
error: Found argument 'ext-cli' which wasn't expected, or isn't valid in this context
...