fix: include actual key name in /overrideconfig unsupported key error message#4874
Merged
arturcic merged 2 commits intoGitTools:mainfrom Mar 16, 2026
Merged
fix: include actual key name in /overrideconfig unsupported key error message#4874arturcic merged 2 commits intoGitTools:mainfrom
arturcic merged 2 commits intoGitTools:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Improves the clarity of GitVersion’s CLI error reporting when /overrideconfig is provided with an unsupported configuration key, aligning behavior with issue #4873.
Changes:
- Update the
/overrideconfigunsupported-keyWarningExceptionmessage to include the actual invalid key name. - Update the existing unit test expected string to match the new error message format.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/GitVersion.App/ArgumentParser.cs |
Includes the actual override key in the unsupported-key error message. |
src/GitVersion.App.Tests/ArgumentParserTests.cs |
Adjusts the expected exception message in the invalid overrideconfig test data. |
… message * Initial plan * fix: include actual key name in /overrideconfig unsupported key error message Co-authored-by: denisbredikhin <11455823+denisbredikhin@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: denisbredikhin <11455823+denisbredikhin@users.noreply.github.com>
arturcic
requested changes
Mar 16, 2026
Co-authored-by: Artur <artur.stolear@gmail.com>
|
arturcic
approved these changes
Mar 16, 2026
Contributor
|
Thank you @denisbredikhin for your contribution! |
This was referenced Mar 17, 2026
Open
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.



Description
ArgumentParser.cs: Interpolate the actual key name into the error messageArgumentParserTests.cs: Update expected string in existing test case to match new formatBefore
Could not parse /overrideconfig option: key1=value1. Unsupported 'key'.
After
Could not parse /overrideconfig option: key1=value1. Unsupported key 'key1'.
Related Issue
Resolves #4873
Motivation and Context
To have a clearer error message in case of GitVersion misconfiguration.
How Has This Been Tested?
Changes are minimal; testing with provided unit tests looks reasonable.
Checklist: