Permalink
Browse files

Test suite: derive name of ghc-pkg from GHC

  • Loading branch information...
1 parent ba91367 commit 4fdf62939bda686098b1bc9143d5c4f9ce3c8a60 @tibbe tibbe committed Oct 4, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 Cabal/tests/PackageTests/PackageTester.hs
@@ -241,4 +241,7 @@ getGHC :: IO String
getGHC = fromMaybe "ghc" `fmap` lookupEnv "GHC"
getGHCPkg :: IO String
-getGHCPkg = fromMaybe "ghc-pkg" `fmap` lookupEnv "GHC_PKG"
+getGHCPkg = do
+ ghc <- getGHC
+ -- Somewhat brittle, but better than nothing.
+ return $ "ghc-pkg" ++ drop 3 ghc

0 comments on commit 4fdf629

Please sign in to comment.