@@ -124,7 +124,6 @@ type BaseCommandBuilder<'A, 'B, 'C, 'D, 'E, 'F, 'G, 'H, 'Output>() =
124124 invalidOp " Only 8 inputs are supported."
125125
126126
127- //member val CommandLineBuilder = CommandLineBuilder().UseDefaults() with get, set
128127 member val CommandLineConfiguration = new CommandLineConfiguration( new RootCommand()) with get, set
129128
130129 member this.Yield _ =
@@ -397,7 +396,7 @@ type RootCommandBuilder<'A, 'B, 'C, 'D, 'E, 'F, 'G, 'H, 'Output>(args: string ar
397396 |> this.SetHandlerUnit spec
398397 |> addGlobalOptionsToCommand spec.GlobalInputs
399398
400- CommandLineParser .Parse( rootCommand , args ) .Invoke()
399+ rootCommand .Parse( args , this.CommandLineConfiguration ) .Invoke()
401400
402401 /// Executes a Command with a handler that returns int.
403402 member this.Run ( spec : CommandSpec < 'Inputs , int >) =
@@ -406,8 +405,8 @@ type RootCommandBuilder<'A, 'B, 'C, 'D, 'E, 'F, 'G, 'H, 'Output>(args: string ar
406405 |> this.SetGeneralProperties spec
407406 |> this.SetHandlerInt spec
408407 |> addGlobalOptionsToCommand spec.GlobalInputs
409-
410- CommandLineParser .Parse( rootCommand , args ) .Invoke()
408+
409+ rootCommand .Parse( args , this.CommandLineConfiguration ) .Invoke()
411410
412411 /// Executes a Command with a handler that returns a Task<unit> or Task<int>.
413412 member this.Run ( spec : CommandSpec < 'Inputs , Task < unit >>) =
@@ -417,7 +416,7 @@ type RootCommandBuilder<'A, 'B, 'C, 'D, 'E, 'F, 'G, 'H, 'Output>(args: string ar
417416 |> this.SetHandlerTask spec
418417 |> addGlobalOptionsToCommand spec.GlobalInputs
419418
420- CommandLineParser .Parse( rootCommand , args ) .InvokeAsync()
419+ rootCommand .Parse( args , this.CommandLineConfiguration ) .InvokeAsync()
421420
422421 /// Executes a Command with a handler that returns a Task<unit> or Task<int>.
423422 member this.Run ( spec : CommandSpec < 'Inputs , Task < int >>) =
@@ -427,7 +426,7 @@ type RootCommandBuilder<'A, 'B, 'C, 'D, 'E, 'F, 'G, 'H, 'Output>(args: string ar
427426 |> this.SetHandlerTaskInt spec
428427 |> addGlobalOptionsToCommand spec.GlobalInputs
429428
430- CommandLineParser .Parse( rootCommand , args ) .InvokeAsync()
429+ rootCommand .Parse( args , this.CommandLineConfiguration ) .InvokeAsync()
431430
432431
433432/// Builds a `System.CommandLine.Command`.
0 commit comments