summaryrefslogtreecommitdiff
path: root/hadrian/src/Environment.hs
diff options
context:
space:
mode:
authorAdam Sandberg Eriksson <adam@sandbergericsson.se>2019-01-02 22:08:49 +0100
committerBen Gamari <ben@smart-cactus.org>2019-01-27 08:32:12 -0500
commit5cb071af5b02b7433b2bb4d06062ac8b6fb387e8 (patch)
tree7ac2a837b65e743041eff789e952a732cc6811f9 /hadrian/src/Environment.hs
parentd0b8a16e388480306c5a07f8bd5172cff84138d4 (diff)
downloadhaskell-5cb071af5b02b7433b2bb4d06062ac8b6fb387e8.tar.gz
hadrian: use new-exec to make sure alex & happy are in PATH (#16120)
Diffstat (limited to 'hadrian/src/Environment.hs')
-rw-r--r--hadrian/src/Environment.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/hadrian/src/Environment.hs b/hadrian/src/Environment.hs
index 1666c68322..ef98bb100b 100644
--- a/hadrian/src/Environment.hs
+++ b/hadrian/src/Environment.hs
@@ -10,6 +10,10 @@ setupEnvironment = do
-- Cabal refuses to work when GHC_PACKAGE_PATH is set (e.g. by Stack)
unsetEnv "GHC_PACKAGE_PATH"
+ -- cabal new-exec sets GHC_ENVIRONMENT, it needs to be unset for GHC
+ -- invocations to work properly
+ unsetEnv "GHC_ENVIRONMENT"
+
-- in MinGW if PWD is set to a Windows "C:\\" style path then configure
-- `pwd` will return the Windows path, and then modifying $PATH will fail.
-- See https://github.com/snowleopard/hadrian/issues/189 for details.