Skip to content

Conversation

@phlptp
Copy link
Collaborator

@phlptp phlptp commented Jul 24, 2025

Check the requirements first.
Previously the callbacks were done first, but with custom callbacks this cause side effects unexpectedly.

@phlptp phlptp added the bug label Jul 24, 2025
@phlptp
Copy link
Collaborator Author

phlptp commented Jul 24, 2025

Fixes #1184

@codecov
Copy link

codecov bot commented Jul 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e4ee3af) to head (59a7ce8).
Report is 110 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #1186     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files           17        17             
  Lines         4546      5172    +626     
  Branches         0      1060   +1060     
===========================================
+ Hits          4546      5172    +626     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@phlptp phlptp merged commit 2a59b28 into CLIUtils:main Jul 25, 2025
60 checks passed
@phlptp phlptp deleted the requirements_v_callbacks branch July 25, 2025 13:53
VolkerChristian added a commit to SNodeC/CLI11 that referenced this pull request Sep 5, 2025
Some use cases require altering subcommand/option states (and thus the help
output) based on a flag stored in the config file. In this case, running
`_process_callbacks()` before `_process_help_flags()` is necessary.

A new compile-time option `CLI11_USE_OLD_HELP_PROCESSING` restores this
“old” behavior by executing callbacks prior to help flag processing.

Extends CLIUtils#1186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant