We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87d11d4 commit 93af289Copy full SHA for 93af289
1 file changed
src/Tests/SimpleAppTest.fs
@@ -183,17 +183,17 @@ let ``08 - Validators`` () =
183
184
[<Test>]
185
let ``09 tryParser Directory Info`` () =
186
- testRootCommand "--directory .." {
+ testRootCommand "--directory \"c:/fake\"" {
187
description "Custom parser for directory info"
188
inputs (
189
- option<System.IO.DirectoryInfo> "--directory"
+ option "--directory"
190
|> desc "A directory path"
191
|> required
192
|> tryParse (fun res ->
193
let path = res.Tokens[0].Value
194
- if path = ".."
195
- then Error "'..' is not a valid directory"
196
- else Ok (System.IO.DirectoryInfo path)
+ if System.IO.Directory.Exists path
+ then Ok (System.IO.DirectoryInfo path)
+ else Error $"'{path}' is not a valid directory."
197
)
198
199
setAction (fun dir ->
0 commit comments