openupm / openupm-cli

The OpenUPM-CLI is a command-line interface for maintaining UPM registries.
https://openupm.com
BSD 3-Clause "New" or "Revised" License
241 stars 13 forks source link

Not (lost) support `--chdir` option #407

Closed nowsprinting closed 6 days ago

nowsprinting commented 1 week ago

When I use the -c (--chdir) option I get the following error:

error: unknown option '-c'

It was working before, and the README still mentions it.

ComradeVanti commented 6 days ago

You are right. Actually a recent change I made broke all global options. They now need to be appended after the command. Ie openupm add -c some/path com.some.package. But this was a mistake. I will revert it but in the meantime that is how you can get around it.

ComradeVanti commented 6 days ago

Actually now that I think about it, this is something that I would like to put up for discussion a bit. So just to be clear:

Previously there were global options which could be applied to the openupm base-command. They could always be put there even if they did not make sense for the used subcommand. For example you could specify the -c flag for the view command even though it is not used there.

Now each subcommand has it's own options and only uses those that it actually needs. For example add has the -c option, but view does not. This makes more sense but also means that current users might be confused. This new behavior would also need to be described in the documentation.

@favoyang what is your take on this? Also @nowsprinting you are welcome to give your input :)