Commit 612fa9e0 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Run 'regenerateHaddockIndex' when we're in a sandbox.

Fixes #1337.
parent c9a77353
...@@ -674,7 +674,7 @@ postInstallActions verbosity ...@@ -674,7 +674,7 @@ postInstallActions verbosity
when (reportingLevel == DetailedReports) $ when (reportingLevel == DetailedReports) $
storeDetailedBuildReports verbosity logsDir buildReports storeDetailedBuildReports verbosity logsDir buildReports
regenerateHaddockIndex verbosity packageDBs comp platform conf regenerateHaddockIndex verbosity packageDBs comp platform conf useSandbox
configFlags installFlags installPlan configFlags installFlags installPlan
symlinkBinaries verbosity configFlags installFlags installPlan symlinkBinaries verbosity configFlags installFlags installPlan
...@@ -728,11 +728,12 @@ regenerateHaddockIndex :: Verbosity ...@@ -728,11 +728,12 @@ regenerateHaddockIndex :: Verbosity
-> Compiler -> Compiler
-> Platform -> Platform
-> ProgramConfiguration -> ProgramConfiguration
-> UseSandbox
-> ConfigFlags -> ConfigFlags
-> InstallFlags -> InstallFlags
-> InstallPlan -> InstallPlan
-> IO () -> IO ()
regenerateHaddockIndex verbosity packageDBs comp platform conf regenerateHaddockIndex verbosity packageDBs comp platform conf useSandbox
configFlags installFlags installPlan configFlags installFlags installPlan
| haddockIndexFileIsRequested && shouldRegenerateHaddockIndex = do | haddockIndexFileIsRequested && shouldRegenerateHaddockIndex = do
...@@ -758,8 +759,9 @@ regenerateHaddockIndex verbosity packageDBs comp platform conf ...@@ -758,8 +759,9 @@ regenerateHaddockIndex verbosity packageDBs comp platform conf
-- We want to regenerate the index if some new documentation was actually -- We want to regenerate the index if some new documentation was actually
-- installed. Since the index is per-user, we don't do it for global -- installed. Since the index is per-user, we don't do it for global
-- installs or special cases where we're installing into a specific db. -- installs or special cases where we're installing into a specific db
shouldRegenerateHaddockIndex = normalUserInstall -- (except when we're in a sandbox; see #1337).
shouldRegenerateHaddockIndex = (normalUserInstall || isUseSandbox useSandbox)
&& someDocsWereInstalled installPlan && someDocsWereInstalled installPlan
where where
someDocsWereInstalled = any installedDocs . InstallPlan.toList someDocsWereInstalled = any installedDocs . InstallPlan.toList
......
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