Skip to content

Honor custom separators in argument group errors - #2526

Open
UlikGames wants to merge 1 commit into
remkop:mainfrom
UlikGames:fix/2500-custom-separator-message
Open

UlikGames wants to merge 1 commit into
remkop:mainfrom
UlikGames:fix/2500-custom-separator-message

Conversation

@UlikGames

Copy link
Copy Markdown

Fixes #2500.

Argument group validation was formatting required options with =, even when the command configured a different separator. This could produce messages such as --output=<output> for commands that only accept --output:<output>.

The problem came from two group-validation paths using an ArgSpec.describe overload that always used =. This change passes the command's configured separator through both paths.

I added regression coverage for a partially specified group and for a group matched through a required child group.

Tests:

  • .\gradlew.bat :test --tests picocli.ArgGroupTest
  • .\gradlew.bat build --no-daemon

This branch has not been deployed

No deployments
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.

PicoCLI does not use customized option-parameter separator in missing argument message

1 participant