fix #2771 and #2772 - Option action fixes#2782
Open
jonsequitur wants to merge 3 commits intodotnet:mainfrom
Open
fix #2771 and #2772 - Option action fixes#2782jonsequitur wants to merge 3 commits intodotnet:mainfrom
jonsequitur wants to merge 3 commits intodotnet:mainfrom
Conversation
jeffhandley
approved these changes
Apr 2, 2026
Member
jeffhandley
left a comment
There was a problem hiding this comment.
Just one suggestion, but looks good. I also updated the PR description to add more context.
84d86f8 to
f1210cb
Compare
f1210cb to
6de04f7
Compare
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.
Fixes #2771
Fixes #2772
This pull request improves how non-terminating option actions are handled in the command-line invocation pipeline, ensuring their return values are correctly propagated and prioritized over command actions when appropriate. It also adds comprehensive tests for these scenarios and refactors the test action helpers to support custom return values.
InvocationPipeline.InvokeandInvokeAsyncto propagate the return value from non-terminating pre-actions (such as option actions) and ensure that if both a pre-action and a command action return nonzero exit codes, the pre-action's value takes precedence. If no command action is present, the pre-action's return value is used; otherwise, the command action's return value is used only if all pre-actions return zero.