@@ -124,7 +124,6 @@ type BaseCommandBuilder<'A, 'B, 'C, 'D, 'E, 'F, 'G, 'H, 'Output>() =
124
124
invalidOp " Only 8 inputs are supported."
125
125
126
126
127
- //member val CommandLineBuilder = CommandLineBuilder().UseDefaults() with get, set
128
127
member val CommandLineConfiguration = new CommandLineConfiguration( new RootCommand()) with get, set
129
128
130
129
member this.Yield _ =
@@ -397,7 +396,7 @@ type RootCommandBuilder<'A, 'B, 'C, 'D, 'E, 'F, 'G, 'H, 'Output>(args: string ar
397
396
|> this.SetHandlerUnit spec
398
397
|> addGlobalOptionsToCommand spec.GlobalInputs
399
398
400
- CommandLineParser .Parse( rootCommand , args ) .Invoke()
399
+ rootCommand .Parse( args , this.CommandLineConfiguration ) .Invoke()
401
400
402
401
/// Executes a Command with a handler that returns int.
403
402
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
406
405
|> this.SetGeneralProperties spec
407
406
|> this.SetHandlerInt spec
408
407
|> addGlobalOptionsToCommand spec.GlobalInputs
409
-
410
- CommandLineParser .Parse( rootCommand , args ) .Invoke()
408
+
409
+ rootCommand .Parse( args , this.CommandLineConfiguration ) .Invoke()
411
410
412
411
/// Executes a Command with a handler that returns a Task<unit> or Task<int>.
413
412
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
417
416
|> this.SetHandlerTask spec
418
417
|> addGlobalOptionsToCommand spec.GlobalInputs
419
418
420
- CommandLineParser .Parse( rootCommand , args ) .InvokeAsync()
419
+ rootCommand .Parse( args , this.CommandLineConfiguration ) .InvokeAsync()
421
420
422
421
/// Executes a Command with a handler that returns a Task<unit> or Task<int>.
423
422
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
427
426
|> this.SetHandlerTaskInt spec
428
427
|> addGlobalOptionsToCommand spec.GlobalInputs
429
428
430
- CommandLineParser .Parse( rootCommand , args ) .InvokeAsync()
429
+ rootCommand .Parse( args , this.CommandLineConfiguration ) .InvokeAsync()
431
430
432
431
433
432
/// Builds a `System.CommandLine.Command`.
0 commit comments