diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-08-04 21:14:45 +0200 |
---|---|---|
committer | Daniel Gröber (dxld) <dxld@darkboxed.org> | 2019-09-17 17:48:26 +0200 |
commit | 23864c59abfc6dad5a6b137941d618903817e1e3 (patch) | |
tree | 7a7394017e8ec0595acb8bb0a5ec3201b8bbaf47 /src/CabalHelper/Compiletime/Program/Stack.hs | |
parent | a93ed8c7d93df1860d2e56b400b724ac47edf470 (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/Stack.hs')
-rw-r--r-- | src/CabalHelper/Compiletime/Program/Stack.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/CabalHelper/Compiletime/Program/Stack.hs b/src/CabalHelper/Compiletime/Program/Stack.hs index 3cdf87b..896c73e 100644 --- a/src/CabalHelper/Compiletime/Program/Stack.hs +++ b/src/CabalHelper/Compiletime/Program/Stack.hs @@ -112,14 +112,14 @@ listPackageCabalFiles qe@QueryEnv{qeProjLoc=ProjLocStackYaml stack_yaml} workdirArg :: QueryEnvI c 'Stack -> [String] workdirArg QueryEnv{qeDistDir=DistDirStack mworkdir} = maybeToList $ ("--work-dir="++) . unRelativePath <$> mworkdir -workdirArg QueryEnv{qeDistDir=DistDirCabal{}} = - error "workdirArg: TODO: this case is impossible and should not produce an exhaustiveness warning anymore starting with GHC 8.8" -doStackCmd :: (QueryEnvI c 'Stack -> CallProcessWithCwd a) - -> QueryEnvI c 'Stack -> Maybe FilePath -> [String] -> IO a +doStackCmd :: (QueryEnvI c 'Stack -> CallProcessWithCwdAndEnv a) + -> QueryEnvI c 'Stack + -> Maybe FilePath -> [String] -> IO a doStackCmd procfn qe mcwd args = let Programs{..} = qePrograms qe in - procfn qe mcwd stackProgram $ stackArgsBefore ++ args ++ stackArgsAfter + procfn qe mcwd stackEnv stackProgram $ + stackArgsBefore ++ args ++ stackArgsAfter readStackCmd :: QueryEnvI c 'Stack -> Maybe FilePath -> [String] -> IO String callStackCmd :: QueryEnvI c 'Stack -> Maybe FilePath -> [String] -> IO () |