From 1abc9455457f342a2faf71c8563e61e9e6edee22 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 8 Jun 2022 08:59:43 -0500 Subject: [PATCH] fix(parser): Process overrides with new Actions --- src/parser/parser.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parser/parser.rs b/src/parser/parser.rs index bdda730e..7b1d5130 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -1563,6 +1563,10 @@ impl<'help, 'cmd> Parser<'help, 'cmd> { } fn start_custom_arg(&self, matcher: &mut ArgMatcher, arg: &Arg<'help>, source: ValueSource) { + if source == ValueSource::CommandLine { + // With each new occurrence, remove overrides from prior occurrences + self.remove_overrides(arg, matcher); + } matcher.start_custom_arg(arg, source); for group in self.cmd.groups_for_arg(&arg.id) { matcher.start_custom_group(&group, source);