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`` () =
183183
184184[<Test>]
185185let ``09 tryParser Directory Info`` () =
186- testRootCommand " --directory .. " {
186+ testRootCommand " --directory \" c:/fake \" " {
187187 description " Custom parser for directory info"
188188 inputs (
189- option< System.IO.DirectoryInfo > " --directory"
189+ option " --directory"
190190 |> desc " A directory path"
191191 |> required
192192 |> tryParse ( fun res ->
193193 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. "
197197 )
198198 )
199199 setAction ( fun dir ->
You can’t perform that action at this time.
0 commit comments