diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-09-14 21:51:15 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-09-14 21:51:15 -0400 |
| commit | 6957710b8d2f178efdee336131c3935aebc0b76f (patch) | |
| tree | 90a57d79a0a90e000cea7161fbe0af2c4f4cc69e /src/Propellor/Gpg.hs | |
| parent | 9b715f72c2eb7dec71e0392a2363474f23c1e761 (diff) | |
| parent | 0d93f4f12c4c7d0a37dc2e6f792ce0f9dde793db (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Gpg.hs')
| -rw-r--r-- | src/Propellor/Gpg.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Propellor/Gpg.hs b/src/Propellor/Gpg.hs index 86f84dc1..24743d40 100644 --- a/src/Propellor/Gpg.hs +++ b/src/Propellor/Gpg.hs @@ -14,6 +14,7 @@ import Utility.Process import Utility.Monad import Utility.Misc import Utility.Tmp +import Utility.FileSystemEncoding type KeyId = String @@ -112,8 +113,9 @@ gpgEncrypt f s = do , "--encrypt" , "--trust-model", "always" ] ++ concatMap (\k -> ["--recipient", k]) keyids - encrypted <- writeReadProcessEnv "gpg" opts - Nothing - (Just $ flip hPutStr s) - Nothing + encrypted <- writeReadProcessEnv "gpg" opts Nothing (Just writer) Nothing viaTmp writeFile f encrypted + where + writer h = do + fileEncoding h + hPutStr h s |
