From 1c0f2e8c403126acecfd6d6cccf2ad0b20f38929 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sat, 11 Jan 2020 05:08:03 +0100 Subject: Unset GHC_ENVIRONMENT and GHC_PACKAGE_PATH before invocing GHC When we are invoked under Stack (as part of HIE's test suite for example) our choice of Cabal library when invoking GHC gets interferred with by the GHC_ENVIRONMENT variable. Since we're just using boot packages simply unsetting GHC package related envvars seems like a fairly decent fix here. See the issue below for more details. Fixes #78 --- src/CabalHelper/Compiletime/Types.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/CabalHelper/Compiletime/Types.hs') diff --git a/src/CabalHelper/Compiletime/Types.hs b/src/CabalHelper/Compiletime/Types.hs index 99766dd..ab84178 100644 --- a/src/CabalHelper/Compiletime/Types.hs +++ b/src/CabalHelper/Compiletime/Types.hs @@ -570,9 +570,10 @@ defaultPrograms = Programs "cabal" [] [] "stack" [] [] [] "ghc" "ghc-pkg" "haddock" data EnvOverride - = EnvPrepend String + = EnvUnset + | EnvSet String | EnvAppend String - | EnvReplace String + | EnvPrepend String deriving (Eq, Ord, Show, Read, Generic, Typeable) data CompileOptions = CompileOptions -- cgit v1.2.3