Skip to content

Commit

Permalink
Don't getEnvironment, since runShellCommand does that now.
Browse files Browse the repository at this point in the history
  • Loading branch information
John MacFarlane committed Mar 20, 2013
1 parent e00e4d8 commit 56c1d74
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Data/FileStore/MercurialCommandServer.hs
Expand Up @@ -35,7 +35,6 @@ import System.Exit (ExitCode(..))
import System.IO (Handle, hClose, hPutStr, hFlush)
import System.IO.Unsafe (unsafePerformIO)
import System.Process (runInteractiveProcess)
import System.Environment (getEnvironment)

import qualified Data.ByteString as B
import qualified Data.ByteString.UTF8 as UTF8
Expand All @@ -62,9 +61,8 @@ runMercurialCommand repo command args = do
-- | Run a mercurial command directly without using the server.
rawRunMercurialCommand :: FilePath -> String -> [String] -> IO (ExitCode, String, BL.ByteString)
rawRunMercurialCommand repo command args = do
env <- getEnvironment
let env' = ("HGENCODING","utf8"):env
(status, err, out) <- runShellCommand repo (Just env') "hg" (command : args)
let env = [("HGENCODING","utf8")]
(status, err, out) <- runShellCommand repo (Just env) "hg" (command : args)
return (status, LUTF8.toString err, out)

-- | Create a new command server for the given repository
Expand Down

0 comments on commit 56c1d74

Please sign in to comment.