Commit e9ed987b authored by Alexis Williams's avatar Alexis Williams
Browse files

Fix logic error in CmdInstall

parent 330409b1
......@@ -408,17 +408,18 @@ installAction (configFlags, configExFlags, installFlags, haddockFlags)
$ Map.toList $ targetsMap buildCtx
runProjectPostBuildPhase verbosity baseCtx buildCtx buildOutcomes
unless supportsPkgEnvFiles $ do
warn verbosity "The current compiler doesn't support safely installing libraries. (GHC 8.0+ only)"
let
baseEntries =
GhcEnvFileClearPackageDbStack : fmap GhcEnvFilePackageDb packageDbs
entries = baseEntries ++ entriesForLibraryComponents (targetsMap buildCtx)
entries' = nub (envEntries ++ entries)
contents' = renderGhcEnvironmentFile entries'
createDirectoryIfMissing True (takeDirectory envFile)
writeFileAtomic envFile (BS.pack contents')
if supportsPkgEnvFiles
then do
let
baseEntries =
GhcEnvFileClearPackageDbStack : fmap GhcEnvFilePackageDb packageDbs
entries = baseEntries ++ entriesForLibraryComponents (targetsMap buildCtx)
entries' = nub (envEntries ++ entries)
contents' = renderGhcEnvironmentFile entries'
createDirectoryIfMissing True (takeDirectory envFile)
writeFileAtomic envFile (BS.pack contents')
else
warn verbosity "The current compiler doesn't support safely installing libraries. (GHC 8.0+ only)"
where
configFlags' = disableTestsBenchsByDefault configFlags
verbosity = fromFlagOrDefault normal (configVerbosity configFlags')
......
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