aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Compiletime/Program/GHC.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-08-04 21:14:45 +0200
committerDaniel Gröber (dxld) <dxld@darkboxed.org>2019-09-17 17:48:26 +0200
commit23864c59abfc6dad5a6b137941d618903817e1e3 (patch)
tree7a7394017e8ec0595acb8bb0a5ec3201b8bbaf47 /src/CabalHelper/Compiletime/Program/GHC.hs
parenta93ed8c7d93df1860d2e56b400b724ac47edf470 (diff)
Allow passing override-env to process functions
Unfortunately we need this to pass a custom GHC executable path to stack, since it doesn't have an option to override it on the commandline (yet?).
Diffstat (limited to 'src/CabalHelper/Compiletime/Program/GHC.hs')
-rw-r--r--src/CabalHelper/Compiletime/Program/GHC.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CabalHelper/Compiletime/Program/GHC.hs b/src/CabalHelper/Compiletime/Program/GHC.hs
index e45d921..a42406c 100644
--- a/src/CabalHelper/Compiletime/Program/GHC.hs
+++ b/src/CabalHelper/Compiletime/Program/GHC.hs
@@ -81,7 +81,7 @@ createPkgDb cabalVer = do
<- getPrivateCabalPkgDb $ unpackedToResolvedCabalVersion cabalVer
exists <- doesDirectoryExist db_path
when (not exists) $
- callProcessStderr Nothing (ghcPkgProgram ?progs) ["init", db_path]
+ callProcessStderr Nothing [] (ghcPkgProgram ?progs) ["init", db_path]
return db
getPrivateCabalPkgDb :: (Verbose, Progs) => ResolvedCabalVersion -> IO PackageDbDir
@@ -136,7 +136,7 @@ cabalVersionExistsInPkgDb cabalVer db@(PackageDbDir db_path) = do
invokeGhc :: Env => GhcInvocation -> IO (Either ExitCode FilePath)
invokeGhc GhcInvocation {..} = do
- rv <- callProcessStderr' Nothing (ghcProgram ?progs) $ concat
+ rv <- callProcessStderr' (Just "/") [] (ghcProgram ?progs) $ concat
[ [ "-outputdir", giOutDir
, "-o", giOutput
]