aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Compiletime/Program
diff options
context:
space:
mode:
Diffstat (limited to 'src/CabalHelper/Compiletime/Program')
-rw-r--r--src/CabalHelper/Compiletime/Program/GHC.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/CabalHelper/Compiletime/Program/GHC.hs b/src/CabalHelper/Compiletime/Program/GHC.hs
index b24222f..3baf6d9 100644
--- a/src/CabalHelper/Compiletime/Program/GHC.hs
+++ b/src/CabalHelper/Compiletime/Program/GHC.hs
@@ -134,7 +134,10 @@ cabalVersionExistsInPkgDb cabalVer db@(PackageDbDir db_path) = do
invokeGhc :: Env => GhcInvocation -> IO (Either ExitCode FilePath)
invokeGhc GhcInvocation {..} = do
- rv <- callProcessStderr' (Just "/") [] (ghcProgram ?progs) $ concat
+ -- We unset some interferring envvars here for stack, see:
+ -- https://github.com/DanielG/cabal-helper/issues/78#issuecomment-557860898
+ let eos = [("GHC_ENVIRONMENT", EnvUnset), ("GHC_PACKAGE_PATH", EnvUnset)]
+ rv <- callProcessStderr' (Just "/") eos (ghcProgram ?progs) $ concat
[ [ "-outputdir", giOutDir
, "-o", giOutput
]