Skip to content

Commit 8aab3aa

Browse files
committed
The parser options were not being correctly pushed through to the groups.
1 parent d0c4b99 commit 8aab3aa

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Parser.Internal.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private static IEnumerable<string> SplitCommandLineIntoSegments(string line)
126126
} while (currentPosition < line.Length);
127127
}
128128

129-
private static bool ParseCommandGroups<TOptions>(string[] args, ref TOptions options, TypeArgumentInfo arguments) where TOptions : new()
129+
private static bool ParseCommandGroups<TOptions>(string[] args, ref TOptions options, TypeArgumentInfo arguments, ParserOptions parserOptions) where TOptions : new()
130130
{
131131
if (arguments.ActionArgument == null)
132132
{
@@ -153,7 +153,7 @@ private static IEnumerable<string> SplitCommandLineIntoSegments(string line)
153153
return true;
154154
}
155155

156-
options = InternalParse<TOptions>(args, 1, arguments.ArgumentGroups[args[0]], s_defaultParseOptions);
156+
options = InternalParse<TOptions>(args, 1, arguments.ArgumentGroups[args[0]], parserOptions);
157157
arguments.ActionArgument.SetValue(options, PropertyHelpers.GetValueAsType(args[0], arguments.ActionArgument));
158158
return true;
159159
}

src/Parser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private static bool InternalTryParse<TOptions>(string[] args, ParserOptions pars
174174
// we have groups!
175175
if (!arguments.ArgumentGroups.ContainsKey(string.Empty))
176176
{
177-
return ParseCommandGroups(args, ref options, arguments);
177+
return ParseCommandGroups(args, ref options, arguments, parserOptions);
178178
}
179179

180180
// parse the arguments and build the options object

0 commit comments

Comments
 (0)