Commit 9e0ab3b4 authored by Javier Neira 's avatar Javier Neira Committed by Daniel Gröber (dxld)

Fix store-dir in ghc env files generated by `cabal install --lib --package-env` (#6298)

Use project config instead of global one to get store-dir and logs-dir.

Fixes #5925 
parent b7d5bcbe
......@@ -458,10 +458,14 @@ installAction ( configFlags, configExFlags, installFlags
home <- getHomeDirectory
let
ProjectConfig {
projectConfigBuildOnly = ProjectConfigBuildOnly {
projectConfigLogsDir
},
projectConfigShared = ProjectConfigShared {
projectConfigHcFlavor,
projectConfigHcPath,
projectConfigHcPkg
projectConfigHcPkg,
projectConfigStoreDir
},
projectConfigLocalPackages = PackageConfig {
packageConfigProgramPaths,
......@@ -529,9 +533,9 @@ installAction ( configFlags, configExFlags, installFlags
cabalDir <- getCabalDir
mstoreDir <-
sequenceA $ makeAbsolute <$> flagToMaybe (globalStoreDir globalFlags)
sequenceA $ makeAbsolute <$> flagToMaybe projectConfigStoreDir
let
mlogsDir = flagToMaybe (globalLogsDir globalFlags)
mlogsDir = flagToMaybe projectConfigLogsDir
cabalLayout = mkCabalDirLayout cabalDir mstoreDir mlogsDir
packageDbs = storePackageDBStack (cabalStoreDirLayout cabalLayout) compilerId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment