diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-21 19:47:15 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-21 19:47:15 -0400 |
| commit | eac925f398df39791fe8236f8f8329627761f2e9 (patch) | |
| tree | 9ce53fbad65c36bb39b5102e6792219b43c34d2a /src/Propellor/PrivData.hs | |
| parent | 2d1671d5ebdd3c7f99d4023ac621137938505962 (diff) | |
| parent | 85f08ee913a77c16ba4d264581b1240468c4ebb2 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/PrivData.hs')
| -rw-r--r-- | src/Propellor/PrivData.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Propellor/PrivData.hs b/src/Propellor/PrivData.hs index 070070f0..aac37d14 100644 --- a/src/Propellor/PrivData.hs +++ b/src/Propellor/PrivData.hs @@ -17,6 +17,7 @@ module Propellor.PrivData ( makePrivDataDir, decryptPrivData, readPrivData, + readPrivDataFile, PrivMap, PrivInfo, forceHostContext, @@ -254,6 +255,9 @@ decryptPrivData = readPrivData <$> gpgDecrypt privDataFile readPrivData :: String -> PrivMap readPrivData = fromMaybe M.empty . readish +readPrivDataFile :: FilePath -> IO PrivMap +readPrivDataFile f = readPrivData <$> readFileStrictAnyEncoding f + makePrivDataDir :: IO () makePrivDataDir = createDirectoryIfMissing False privDataDir |
