diff options
author | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-25 17:41:59 +0200 |
---|---|---|
committer | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-25 17:41:59 +0200 |
commit | 1557c08cac99befbd541dcca4d85c20609518f2b (patch) | |
tree | 3380169a3b066be62e887fc87ba6750e5c28dd3b /haddock-test/src | |
parent | 0f2b8a81aa01fd7f008e92c8963135ef14dc545d (diff) |
Fix test suite failure when used with Stack.
Diffstat (limited to 'haddock-test/src')
-rw-r--r-- | haddock-test/src/Test/Haddock/Config.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/haddock-test/src/Test/Haddock/Config.hs b/haddock-test/src/Test/Haddock/Config.hs index fff84921..8f1f4885 100644 --- a/haddock-test/src/Test/Haddock/Config.hs +++ b/haddock-test/src/Test/Haddock/Config.hs @@ -213,6 +213,11 @@ printVersions env haddockPath = do baseDependencies :: FilePath -> IO [String] baseDependencies ghcPath = do + -- The 'getInstalledPackages' crashes if used when "GHC_PACKAGE_PATH" is + -- set to some value. I am not sure why is that happening and what are the + -- consequences of unsetting it - but looks like it works (for now). + unsetEnv "GHC_PACKAGE_PATH" + (_, _, cfg) <- configure normal (Just ghcPath) Nothing defaultProgramConfiguration pkgIndex <- getInstalledPackages normal [GlobalPackageDB] cfg |