Fix OnUsageError Trigger When Error Is Caused by Mutually Exclusive Flags#2152
Merged
dearchap merged 4 commits intourfave:mainfrom Jun 6, 2025
Merged
Conversation
dearchap
approved these changes
Jun 6, 2025
1 task
ugoenyioha
pushed a commit
to ugoenyioha/tea
that referenced
this pull request
Jan 2, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/urfave/cli/v3](https://github.com/urfave/cli) | require | patch | `v3.3.3` -> `v3.3.8` | --- ### Release Notes <details> <summary>urfave/cli (github.com/urfave/cli/v3)</summary> ### [`v3.3.8`](https://github.com/urfave/cli/releases/tag/v3.3.8) [Compare Source](urfave/cli@v3.3.7...v3.3.8) #### What's Changed - Remove "alpha" wording around `v3` series by [@​meatballhat](https://github.com/meatballhat) in urfave/cli#2155 **Full Changelog**: urfave/cli@v3.3.7...v3.3.8 ### [`v3.3.7`](https://github.com/urfave/cli/releases/tag/v3.3.7) [Compare Source](urfave/cli@v3.3.6...v3.3.7) #### What's Changed - fix: add missing `IsLocal` for BoolWithInverseFlag by [@​huiyifyj](https://github.com/huiyifyj) in urfave/cli#2151 - Fix OnUsageError Trigger When Error Is Caused by Mutually Exclusive Flags by [@​Ali-Doustkani](https://github.com/Ali-Doustkani) in urfave/cli#2152 #### New Contributors - [@​Ali-Doustkani](https://github.com/Ali-Doustkani) made their first contribution in urfave/cli#2152 **Full Changelog**: urfave/cli@v3.3.6...v3.3.7 ### [`v3.3.6`](https://github.com/urfave/cli/releases/tag/v3.3.6) [Compare Source](urfave/cli@v3.3.5...v3.3.6) #### What's Changed - Fish completions with identically named sub-commands now work by [@​bittrance](https://github.com/bittrance) in urfave/cli#2130 **Full Changelog**: urfave/cli@v3.3.5...v3.3.6 ### [`v3.3.5`](https://github.com/urfave/cli/releases/tag/v3.3.5) [Compare Source](urfave/cli@v3.3.4...v3.3.5) #### What's Changed - Fix:(issue\_2137) Ensure default value for bool with inverse flag is h… by [@​dearchap](https://github.com/dearchap) in urfave/cli#2138 - Fix:(issue\_2131) Show help text for BoolWithInverseFlag by [@​Juneezee](https://github.com/Juneezee) in urfave/cli#2142 **Full Changelog**: urfave/cli@v3.3.4...v3.3.5 ### [`v3.3.4`](https://github.com/urfave/cli/releases/tag/v3.3.4) [Compare Source](urfave/cli@v3.3.3...v3.3.4) #### What's Changed - Fix Docs(issue\_2125) Add PathFlag to StringFlag migration by [@​dearchap](https://github.com/dearchap) in urfave/cli#2136 - fix: remove extraneous space from subcommand help template by [@​G-Rath](https://github.com/G-Rath) in urfave/cli#2140 - Fix:(issue\_2135) Correct formatting of default subcommand USAGE text by [@​zzspoon](https://github.com/zzspoon) in urfave/cli#2139 #### New Contributors - [@​zzspoon](https://github.com/zzspoon) made their first contribution in urfave/cli#2139 **Full Changelog**: urfave/cli@v3.3.3...v3.3.4 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC40OS42IiwidXBkYXRlZEluVmVyIjoiNDAuNDkuNiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://gitea.com/gitea/tea/pulls/766 Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What this PR does / why we need it:
The
OnUsageErrorfunction is not triggered when mutually exclusive flags are provided. This PR fixes the issue by ensuringOnUsageErroris properly called in that case.Which issue(s) this PR fixes:
Fixes #2146
Special notes for your reviewer:
Could not think of other cases. Let me know if it makes sense for more coverage.
Release Notes
OnUsageErrorhandler.