File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -183,17 +183,17 @@ let ``08 - Validators`` () =
183
183
184
184
[<Test>]
185
185
let ``09 tryParser Directory Info`` () =
186
- testRootCommand " --directory .. " {
186
+ testRootCommand " --directory \" c:/fake \" " {
187
187
description " Custom parser for directory info"
188
188
inputs (
189
- option< System.IO.DirectoryInfo > " --directory"
189
+ option " --directory"
190
190
|> desc " A directory path"
191
191
|> required
192
192
|> tryParse ( fun res ->
193
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)
194
+ if System.IO.Directory.Exists path
195
+ then Ok ( System.IO.DirectoryInfo path )
196
+ else Error $ " '{ path}' is not a valid directory. "
197
197
)
198
198
)
199
199
setAction ( fun dir ->
You can’t perform that action at this time.
0 commit comments