Commit 81a752bc authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Initialise 'configInstallDirs' properly when loading sandbox config.

Fixes #1482.
parent 3b990b1c
......@@ -322,12 +322,25 @@ tryLoadSandboxPackageEnvironmentFile verbosity pkgEnvFile configFileFlag = do
-- Layer the package environment settings over settings from ~/.cabal/config.
cabalConfig <- loadConfig verbosity configFileFlag NoFlag
return (sandboxDir,
updateInstallDirs $
(base `mappend` (toPkgEnv cabalConfig) `mappend`
common `mappend` inherited `mappend` user)
`overrideSandboxSettings` pkgEnv)
where
toPkgEnv config = mempty { pkgEnvSavedConfig = config }
updateInstallDirs pkgEnv =
let config = pkgEnvSavedConfig pkgEnv
configureFlags = savedConfigureFlags config
installDirs = savedUserInstallDirs config
in pkgEnv {
pkgEnvSavedConfig = config {
savedConfigureFlags = configureFlags {
configInstallDirs = installDirs
}
}
}
-- | Should the generated package environment file include comments?
data IncludeComments = IncludeComments | NoComments
......
Supports Markdown
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