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

cabal checks PATH before extra-prog-path #6304

Open
Mistuke opened this issue Oct 20, 2019 · 2 comments · Fixed by #8506
Open

cabal checks PATH before extra-prog-path #6304

Mistuke opened this issue Oct 20, 2019 · 2 comments · Fixed by #8506

Comments

@Mistuke
Copy link
Collaborator

Mistuke commented Oct 20, 2019

Describe the bug
When you have a program that's both on your PATH and in extra-prog-path you can't steer cabal to which one you want locally without modifying your PATH.

This is an issue with pkg-config on Windows because by default global installs of msys2 (such as on appveyor) put the wrong version on your path.

$ cabal v2-build ...

Expected behavior
I expect cabal to use the paths I manually specified in extra-prog-path before the ones in PATH. This allows the use more control over which program they wanted used.

@gbaz
Copy link
Collaborator

gbaz commented Oct 1, 2022

For simple builds it looks like we already prepend the program path:

pathEnv = maybe (intercalate spSep extraPath)

However, for configure we postpend it:

searchpath = getProgramSearchPath initialProgramDb

And ditto for v2 configuration:

As such I'm going to try to change it in the latter two spots.

@jneira
Copy link
Member

jneira commented Jan 7, 2023

We have a pr including tests for non windows systems. However there is no evidence it works for windows: there is no integration test neither a manual test (@Mistuke tried the pr with no success, see #8506 (comment))
Reopening until we have a test for windows

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

Successfully merging a pull request may close this issue.

4 participants