diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-12-24 15:14:05 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-12-24 15:14:05 -0400 |
| commit | 44bf67b7a2da75ef80e32d6409cc41a6ab8b6ffe (patch) | |
| tree | d955382901fd4ea2bec6412d5b652d9ac7ecbe23 /src/Propellor/Gpg.hs | |
| parent | fa974cfaaac31b25ae911b5e970507d0589e567b (diff) | |
GHC's fileSystemEncoding is used for all String IO, to avoid encoding-related crashes in eg, Propellor.Property.File.
Diffstat (limited to 'src/Propellor/Gpg.hs')
| -rw-r--r-- | src/Propellor/Gpg.hs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Propellor/Gpg.hs b/src/Propellor/Gpg.hs index fd2fca79..6ac153cc 100644 --- a/src/Propellor/Gpg.hs +++ b/src/Propellor/Gpg.hs @@ -16,7 +16,6 @@ import Utility.Process.NonConcurrent import Utility.Monad import Utility.Misc import Utility.Tmp -import Utility.FileSystemEncoding import Utility.Env import Utility.Directory @@ -183,7 +182,7 @@ gpgDecrypt :: FilePath -> IO String gpgDecrypt f = do gpgbin <- getGpgBin ifM (doesFileExist f) - ( writeReadProcessEnv gpgbin ["--decrypt", f] Nothing Nothing (Just fileEncoding) + ( writeReadProcessEnv gpgbin ["--decrypt", f] Nothing Nothing Nothing , return "" ) @@ -201,6 +200,4 @@ gpgEncrypt f s = do encrypted <- writeReadProcessEnv gpgbin opts Nothing (Just writer) Nothing viaTmp writeFile f encrypted where - writer h = do - fileEncoding h - hPutStr h s + writer h = hPutStr h s |
