From 15d23d0731aa4e592e709e3626444e18ce3f804a Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sat, 2 May 2020 02:24:34 +0200 Subject: ghc-session: Fix stackBuiltinCabalVersion when snapshot-db has Cabal Stackage can get into the situation where they have a different Cabal version from what was shipped with GHC. This is usually not a problem but when stack installs any package with build-type:custom this pulls in the Stackage Cabal version! --- tests/GhcSession.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs index d05a0a3..a4e7d62 100644 --- a/tests/GhcSession.hs +++ b/tests/GhcSession.hs @@ -512,7 +512,7 @@ stackBuiltinCabalVersion s_ver g_ver = do res <- lookupStackResolver g_ver return $ parseVer . trim <$> readProcess (stackProgram ?progs) [ "--resolver="++res, "--system-ghc", "exec", "--" - , "ghc-pkg", "--simple-output", "field", "Cabal", "version" + , "ghc-pkg", "--simple-output", "--global", "field", "Cabal", "version" ] "" stackCheckCompat :: Version -> Either SkipReason () -- cgit v1.2.3