command-line-api
command-line-api copied to clipboard
`AcceptExistingOnly` for `FileInfo` accepts existing directories
Version 2.0.0 (Also affected 2.0.0-rc.2.25502.107, upgraded while creating issue)
A FileInfo argument/option with AcceptExistingOnly validation, considers an existing directory as valid.
I think it was broken by https://github.com/dotnet/command-line-api/pull/2077 which added the Directory.Exists check here:
Prior to that, it would only have used File.Exists.