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/PrivData.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/PrivData.hs')
| -rw-r--r-- | src/Propellor/PrivData.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Propellor/PrivData.hs b/src/Propellor/PrivData.hs index 2e9cdbab..8ca51e23 100644 --- a/src/Propellor/PrivData.hs +++ b/src/Propellor/PrivData.hs @@ -57,7 +57,6 @@ import Utility.Misc import Utility.FileMode import Utility.Env import Utility.Table -import Utility.FileSystemEncoding import Utility.Directory -- | Allows a Property to access the value of a specific PrivDataField, @@ -171,7 +170,6 @@ getPrivData field context m = do setPrivData :: PrivDataField -> Context -> IO () setPrivData field context = do putStrLn "Enter private data on stdin; ctrl-D when done:" - fileEncoding stdin setPrivDataTo field context . PrivData =<< hGetContentsStrict stdin unsetPrivData :: PrivDataField -> Context -> IO () @@ -274,7 +272,7 @@ readPrivData :: String -> PrivMap readPrivData = fromMaybe M.empty . readish readPrivDataFile :: FilePath -> IO PrivMap -readPrivDataFile f = readPrivData <$> readFileStrictAnyEncoding f +readPrivDataFile f = readPrivData <$> readFileStrict f makePrivDataDir :: IO () makePrivDataDir = createDirectoryIfMissing False privDataDir |
