From 44bf67b7a2da75ef80e32d6409cc41a6ab8b6ffe Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Dec 2016 15:14:05 -0400 Subject: GHC's fileSystemEncoding is used for all String IO, to avoid encoding-related crashes in eg, Propellor.Property.File. --- src/Propellor/Property/Debootstrap.hs | 2 +- src/Propellor/Property/Gpg.hs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs index f8cb6e0e..db114e01 100644 --- a/src/Propellor/Property/Debootstrap.hs +++ b/src/Propellor/Property/Debootstrap.hs @@ -148,7 +148,7 @@ sourceInstall' = withTmpDir "debootstrap" $ \tmpd -> do . filter ("debootstrap_" `isInfixOf`) . filter (".tar." `isInfixOf`) . extractUrls baseurl <$> - readFileStrictAnyEncoding indexfile + readFileStrict indexfile nukeFile indexfile tarfile <- case urls of diff --git a/src/Propellor/Property/Gpg.hs b/src/Propellor/Property/Gpg.hs index 74e9df5a..27baa4ba 100644 --- a/src/Propellor/Property/Gpg.hs +++ b/src/Propellor/Property/Gpg.hs @@ -2,7 +2,6 @@ module Propellor.Property.Gpg where import Propellor.Base import qualified Propellor.Property.Apt as Apt -import Utility.FileSystemEncoding import System.PosixCompat @@ -35,7 +34,6 @@ keyImported key@(GpgKeyId keyid) user@(User u) = prop ( return NoChange , makeChange $ withHandle StdinHandle createProcessSuccess (proc "su" ["-c", "gpg --import", u]) $ \h -> do - fileEncoding h hPutStr h (unlines keylines) hClose h ) -- cgit v1.2.3