Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Cobra's built-in MutuallyExclusive flag helper #6590

Closed
wants to merge 1 commit into from

Conversation

mislav
Copy link
Contributor

@mislav mislav commented Nov 9, 2022

This looks more declarative but the error message is abysmal:

%  gh repo create --public --private
if any flags in the group [public private internal] are set none of the others can be; [private public] were all set

TODO:

  • figure out if we can transform Cobra's error message into something like before
  • fix tests

Base automatically changed from cobra-update to trunk December 21, 2022 13:59
@rsteube
Copy link
Contributor

rsteube commented Apr 17, 2023

Think the only option here at the moment would be to set SilenceErrors and do some matching and regex transformation on the err returned by Execute for that (yuck).

@mislav
Copy link
Contributor Author

mislav commented May 23, 2023

Closing this; switching to Cobra was a downgrade and didn't improve anything other than brevity of code.

@mislav mislav closed this May 23, 2023
@mislav mislav deleted the cobra-mutually-exclusive branch May 23, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants