Closed josephw closed 3 years ago
Looking through open PRs; this is an identical fix to #810, which was opened back in May 2019, but didn't get a response. The code change being so similar makes me more confident that this is the right fix. That PR has conflicts due to also updating CHANGELOG.md
, but would otherwise be good to merge.
@eirslett, any feedback on whether this is a reasonable approach? My aim is to move off an old internal fork of this plugin.
Hey @eirslett; does this (or #810) look good to merge? I'm happy to make revisions, or consider another approach.
@eirslett ping; some response welcome 😄. My alternative is to update and maintain a fork, which doesn't seem like valuable work.
Hey, sorry! I'll merge it now!
Thanks!
The arguments you want to pass may repeat a value. Accept this case, but continue to ignore additionalArguments that have already been supplied.
Summary
Accept repeated values for arguments. I have a use case of:
and, currently, this is passed through as
--arg1 Value --arg2
.As a workaround, I could use another form (e.g.,
--arg1=Value --arg2=Value
), but I'm aiming to upgrade from a pre-ArgumentsParser
version of this plugin, and it would be good to leave usage as-is.(I believe this is also the bug reported in #880.)
Tests and Documentation
Existing unit tests pass. A new test demonstrates the new behaviour. I don't believe the original behaviour was documented, so this doesn't make any documentation changes.