Skip to content

Commit 25f3253

Browse files
author
HaskellMouse
committed
Fixed a bug with ignoring cpPkg and cpCompiler fields.
1 parent 056f539 commit 25f3253

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Bug fixes:
1717

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

2123
## v2.7.3
2224

src/Stack/Build/Execute.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -886,11 +886,11 @@ ensureConfig newConfigCache pkgDir ExecuteEnv {..} announce cabal cabalfp task =
886886
let programNames =
887887
case cpWhich cp of
888888
Ghc ->
889-
[ "--with-ghc=" ++ toFilePath (cpCompiler cp)
890-
, "--with-ghc-pkg=" ++ toFilePath pkgPath
889+
[ ("ghc", toFilePath (cpCompiler cp))
890+
, ("ghc-pkg", toFilePath pkgPath)
891891
]
892-
exes <- forM programNames $ \name -> do
893-
mpath <- findExecutable name
892+
exes <- forM programNames $ \(name, file) -> do
893+
mpath <- findExecutable file
894894
return $ case mpath of
895895
Left _ -> []
896896
Right x -> return $ concat ["--with-", name, "=", x]

0 commit comments

Comments
 (0)