From 00e824fd0460d5275fc6c6730dd701623f3492c3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 15 Sep 2015 11:21:39 -0400 Subject: avoid a change to readProcess that I regretted in the morning Seems better to keep handle encoding issues out of that module. --- src/Propellor/Gpg.hs | 2 +- src/Utility/Process.hs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/Propellor/Gpg.hs b/src/Propellor/Gpg.hs index 24743d40..f2ae8f9a 100644 --- a/src/Propellor/Gpg.hs +++ b/src/Propellor/Gpg.hs @@ -99,7 +99,7 @@ gitCommit ps = do gpgDecrypt :: FilePath -> IO String gpgDecrypt f = ifM (doesFileExist f) - ( readProcess "gpg" ["--decrypt", f] + ( writeReadProcessEnv "gpg" ["--decrypt", f] Nothing Nothing (Just fileEncoding) , return "" ) diff --git a/src/Utility/Process.hs b/src/Utility/Process.hs index 05205de8..c4882a01 100644 --- a/src/Utility/Process.hs +++ b/src/Utility/Process.hs @@ -60,7 +60,6 @@ import Prelude import Utility.Misc import Utility.Exception -import Utility.FileSystemEncoding type CreateProcessRunner = forall a. CreateProcess -> ((Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -> IO a) -> IO a @@ -82,7 +81,6 @@ readProcessEnv cmd args environ = readProcess' p readProcess' :: CreateProcess -> IO String readProcess' p = withHandle StdoutHandle createProcessSuccess p $ \h -> do - fileEncoding h output <- hGetContentsStrict h hClose h return output -- cgit v1.2.3