From 1557c08cac99befbd541dcca4d85c20609518f2b Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Tue, 25 Aug 2015 17:41:59 +0200 Subject: Fix test suite failure when used with Stack. --- haddock-test/src/Test/Haddock/Config.hs | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3