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

Fixed a bug with ignoring cpPkg and cpCompiler fields. #5597

Merged
merged 1 commit into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Bug fixes:

* Ensure that `extra-path` works for case-insensitive `PATH`s on Windows.
See [rio#237](https://github.com/commercialhaskell/rio/pull/237)
* Fix handling of overwritten `ghc` and `ghc-pkg` locations.
[#5597](https://github.com/commercialhaskell/stack/pull/5597)

## v2.7.3

Expand Down
8 changes: 4 additions & 4 deletions src/Stack/Build/Execute.hs
Original file line number Diff line number Diff line change
Expand Up @@ -886,11 +886,11 @@ ensureConfig newConfigCache pkgDir ExecuteEnv {..} announce cabal cabalfp task =
let programNames =
case cpWhich cp of
Ghc ->
[ "--with-ghc=" ++ toFilePath (cpCompiler cp)
, "--with-ghc-pkg=" ++ toFilePath pkgPath
[ ("ghc", toFilePath (cpCompiler cp))
, ("ghc-pkg", toFilePath pkgPath)
]
exes <- forM programNames $ \name -> do
mpath <- findExecutable name
exes <- forM programNames $ \(name, file) -> do
mpath <- findExecutable file
return $ case mpath of
Left _ -> []
Right x -> return $ concat ["--with-", name, "=", x]
Expand Down