Skip to content

Commit c7892cf

Browse files
authored
Merge pull request #26 from mrboring-forks/main
Fixed the Global Options example
2 parents 8ec20bc + 7084829 commit c7892cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,14 +411,14 @@ module Global =
411411
412412
type Options = { EnableLogging: bool; LogFile: FileInfo }
413413
414-
let options: HandlerInput seq = [ enableLogging; logFile ]
414+
let options: ActionInput seq = [ enableLogging; logFile ]
415415
416416
let bind (ctx: ActionContext) =
417417
{ EnableLogging = enableLogging.GetValue ctx.ParseResult
418418
LogFile = logFile.GetValue ctx.ParseResult }
419419
420420
let listCmd =
421-
let action (ctx: InvocationContext, dir: DirectoryInfo) =
421+
let action (ctx: ActionContext, dir: DirectoryInfo) =
422422
let options = Global.bind ctx
423423
if options.EnableLogging then
424424
printfn $"Logging enabled to {options.LogFile.FullName}"
@@ -440,7 +440,7 @@ let listCmd =
440440
}
441441
442442
let deleteCmd =
443-
let action (ctx: InvocationContext, dir: DirectoryInfo, recursive: bool) =
443+
let action (ctx: ActionContext, dir: DirectoryInfo, recursive: bool) =
444444
let options = Global.bind ctx
445445
if options.EnableLogging then
446446
printfn $"Logging enabled to {options.LogFile.FullName}"
@@ -471,7 +471,7 @@ let ioCmd =
471471
}
472472
473473
[<EntryPoint>]
474-
let main argv =
474+
let main (argv: string array) =
475475
let cfg =
476476
commandLineConfiguration {
477477
description "Sample app for System.CommandLine"

0 commit comments

Comments
 (0)