aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2020-05-02 02:24:34 +0200
committerDaniel Gröber <dxld@darkboxed.org>2020-05-02 15:30:11 +0200
commit15d23d0731aa4e592e709e3626444e18ce3f804a (patch)
treeba83b2ade5dd793f08b53371884a7d8975f81aff
parent262231a8f28feb711a8b164c62d9b89bcc11df47 (diff)
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!
-rw-r--r--tests/GhcSession.hs2
1 files changed, 1 insertions, 1 deletions
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 ()