pivotal-cf / pivnet-cli

CLI to interact with Tanzu Network API V2 interface.
Apache License 2.0
34 stars 27 forks source link

Subcommands parsing global flags rather than erroring #12

Closed kirederik closed 6 years ago

kirederik commented 7 years ago

When you run a subcommand with a wrong flag, the CLI gives you a nice error:

$> pivnet products -o                                                                                          
unknown flag `o'

But if the flag is a valid global flag, the CLI doesn't error:

$> pivnet products -v  # this command is equivalent to pivnet -v
0.0.49

Would be nice to have a similar error message rather than parsing the global flag.

cf-gitbot commented 7 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/150083279

The labels on this github issue will be updated when the story is started.

kartiklunkad26 commented 6 years ago

@kirederik Thanks for bringing up this issue! I've added this to our tracker backlog!

pnikonowicz commented 6 years ago

This looks to be a bug in our dependent library https://github.com/jessevdk/go-flags.

Would you like us to file this on their issue page or would you like to so that you can continue to track this?

Closing this for now.