summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-10 14:21:22 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-10 14:21:22 -0400
commita90b91a6f0282d2f663b4685a8cb03e97832bc06 (patch)
tree6f89d666d629fa78bbb35a52d86234e13375df05
parent415cd90c6b274518ea04091b1c458c6a9f6013f8 (diff)
fix EvilLinker to not stomp on environment
-rw-r--r--Build/EvilLinker.hs8
-rwxr-xr-xstandalone/windows/build.sh7
2 files changed, 6 insertions, 9 deletions
diff --git a/Build/EvilLinker.hs b/Build/EvilLinker.hs
index 7b6441e39..c36ec33f3 100644
--- a/Build/EvilLinker.hs
+++ b/Build/EvilLinker.hs
@@ -15,10 +15,12 @@ import Text.Parsec
import Text.Parsec.String
import Control.Applicative ((<$>))
import Control.Monad
+import System.Directory
+import Data.Maybe
import Utility.Monad
import Utility.Process
-import System.Directory
+import Utility.Env
data CmdParams = CmdParams
{ cmd :: String
@@ -121,7 +123,9 @@ restOfLine = newline `after` many (noneOf "\n")
getOutput :: String -> [String] -> Maybe [(String, String)] -> IO (String, Bool)
getOutput c ps environ = do
putStrLn $ unwords [c, show ps]
- out@(s, ok) <- processTranscript' c ps environ Nothing
+ systemenviron <- getEnvironment
+ let environ' = fromMaybe [] environ ++ systemenviron
+ out@(s, ok) <- processTranscript' c ps (Just environ') Nothing
putStrLn $ unwords [c, "finished", show ok, "output size:", show (length s)]
return out
diff --git a/standalone/windows/build.sh b/standalone/windows/build.sh
index 78036ca6b..d1ecab3ed 100755
--- a/standalone/windows/build.sh
+++ b/standalone/windows/build.sh
@@ -51,13 +51,6 @@ withcyg cabal configure
if ! withcyg cabal build; then
rm -f Build/EvilLinker.exe
ghc --make Build/EvilLinker
- WINDIR='C:\Windows\Temp'
- export WINDIR
- mkdir tmp
- TMP=tmp
- TEMP=tmp
- export TMP
- export TEMP
Build/EvilLinker
fi