From 7084829b3778630145747a6286448c3ca8084a20 Mon Sep 17 00:00:00 2001 From: mrboring Date: Mon, 21 Jul 2025 18:17:32 +0100 Subject: [PATCH] Fixed the Global Options example --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b52ac58..23d6a3d 100644 --- a/README.md +++ b/README.md @@ -411,14 +411,14 @@ module Global = type Options = { EnableLogging: bool; LogFile: FileInfo } - let options: HandlerInput seq = [ enableLogging; logFile ] + let options: ActionInput seq = [ enableLogging; logFile ] let bind (ctx: ActionContext) = { EnableLogging = enableLogging.GetValue ctx.ParseResult LogFile = logFile.GetValue ctx.ParseResult } let listCmd = - let action (ctx: InvocationContext, dir: DirectoryInfo) = + let action (ctx: ActionContext, dir: DirectoryInfo) = let options = Global.bind ctx if options.EnableLogging then printfn $"Logging enabled to {options.LogFile.FullName}" @@ -440,7 +440,7 @@ let listCmd = } let deleteCmd = - let action (ctx: InvocationContext, dir: DirectoryInfo, recursive: bool) = + let action (ctx: ActionContext, dir: DirectoryInfo, recursive: bool) = let options = Global.bind ctx if options.EnableLogging then printfn $"Logging enabled to {options.LogFile.FullName}" @@ -471,7 +471,7 @@ let ioCmd = } [] -let main argv = +let main (argv: string array) = let cfg = commandLineConfiguration { description "Sample app for System.CommandLine"