directory icon indicating copy to clipboard operation
directory copied to clipboard

`findExecutable "ghc-9.10.1" behaves surprisingly on windows

Open hasufell opened this issue 6 months ago • 1 comments

ghci> findExecutable "ghc-9.10.1"
Nothing
ghci> findExecutable "ghc-9.10.1.exe"
Just "C:\\ghcup\\bin\\ghc-9.10.1.exe"

This is because "ghc-9.10.1" is considered to contain a file extension. The documentation on SearchPathW states under lpExtension:

The extension to be added to the file name when searching for the file. The first character of the file name extension must be a period (.). The extension is added only if the specified file name does not end with an extension.

hasufell avatar Aug 17 '24 15:08 hasufell