diff options
author | Joey Hess <joey@kitenet.net> | 2013-12-10 14:21:22 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-12-10 14:21:22 -0400 |
commit | a90b91a6f0282d2f663b4685a8cb03e97832bc06 (patch) | |
tree | 6f89d666d629fa78bbb35a52d86234e13375df05 /Build/EvilLinker.hs | |
parent | 415cd90c6b274518ea04091b1c458c6a9f6013f8 (diff) |
fix EvilLinker to not stomp on environment
Diffstat (limited to 'Build/EvilLinker.hs')
-rw-r--r-- | Build/EvilLinker.hs | 8 |
1 files changed, 6 insertions, 2 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 |