Skip to content

Commit

Permalink
Merge pull request #5597 from Haskell-mouse/Fix-ghc-path
Browse files Browse the repository at this point in the history
Fixed a bug with ignoring `cpPkg` and `cpCompiler` fields.
  • Loading branch information
snoyberg authored Aug 10, 2021
2 parents 2127ec1 + 25f3253 commit 37cdf40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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

0 comments on commit 37cdf40

Please sign in to comment.