Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --with-compiler failing to locate compiler on Windows #5753

Merged
merged 1 commit into from
Dec 5, 2018

Conversation

hvr
Copy link
Member

@hvr hvr commented Nov 29, 2018

Due to idiosyncrasies (courtesy of the SearchPath Win32 function) in
the Windows implementation of findExecutable we need to explicitly try
both, with and without appending the Windows specific executable
extensions (i.e. .exe).

For example, before this patch,

 cabal new-build -w ghc-8.6.2

would fail to find the ghc-8.6.2.exe even though it's on %PATH% and
invoking

 ghc-8.6.2 --version

on the CMD.exe shell would have been able to locate the executable.

Due to idiosyncrasies (courtesy of the `SearchPath` Win32 function) in
the Windows implementation of `findExecutable` we need to explicitly try
both, with and without appending the Windows specific executable
extensions (i.e. `.exe`).

For example, before this patch,

   cabal new-build -w ghc-8.6.2

would fail to find the `ghc-8.6.2.exe` even though it's on `%PATH%` and
invoking

   ghc-8.6.2 --version

on the `CMD.exe` shell would have been able to locate the executable.
@hvr hvr added this to the 2.4.1.1 milestone Nov 29, 2018
@hvr hvr requested a review from Mistuke November 29, 2018 14:01
Copy link
Collaborator

@Mistuke Mistuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks @hvr it now all works

tried both and without extension.

@23Skidoo 23Skidoo merged commit c25a223 into haskell:master Dec 5, 2018
@23Skidoo
Copy link
Member

23Skidoo commented Dec 5, 2018

Merged, thanks!

23Skidoo added a commit that referenced this pull request Dec 5, 2018
Fix `--with-compiler` failing to locate compiler on Windows

(cherry picked from commit c25a223)
@23Skidoo
Copy link
Member

23Skidoo commented Dec 5, 2018

Also cherry-picked into 2.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants