Skip to content

Commit 3af0149

Browse files
committed
simplified sample app
1 parent 3b77304 commit 3af0149

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/TestConsole/Program.fs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
module Program
22

33
open FSharp.SystemCommandLine
4-
open System.CommandLine.Invocation
54

6-
let app (ctx: InvocationContext, words: string array, separator: string option) =
5+
let app (words: string array, separator: string option) =
76
let separator = separator |> Option.defaultValue ", "
87
System.String.Join(separator, words) |> printfn "Result: %s"
9-
ctx.ExitCode <- 1
8+
0
109

1110
[<EntryPoint>]
1211
let main argv =
13-
let ctx = Input.InjectedDependency()
1412
let words = Input.Option(["--word"; "-w"], Array.empty, "A list of words to be appended")
1513
let separator = Input.OptionMaybe(["--separator"; "-s"], "A character that will separate the joined words.")
1614

1715
rootCommand argv {
1816
description "Appends words together"
19-
inputs (ctx, words, separator)
17+
inputs (words, separator)
2018
setHandler app
2119
}

0 commit comments

Comments
 (0)