summaryrefslogtreecommitdiff
path: root/src/Propellor/PrivData.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/PrivData.hs')
-rw-r--r--src/Propellor/PrivData.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Propellor/PrivData.hs b/src/Propellor/PrivData.hs
index fd790878..070070f0 100644
--- a/src/Propellor/PrivData.hs
+++ b/src/Propellor/PrivData.hs
@@ -16,6 +16,7 @@ module Propellor.PrivData (
listPrivDataFields,
makePrivDataDir,
decryptPrivData,
+ readPrivData,
PrivMap,
PrivInfo,
forceHostContext,
@@ -248,7 +249,10 @@ modifyPrivData' f = do
return r
decryptPrivData :: IO PrivMap
-decryptPrivData = fromMaybe M.empty . readish <$> gpgDecrypt privDataFile
+decryptPrivData = readPrivData <$> gpgDecrypt privDataFile
+
+readPrivData :: String -> PrivMap
+readPrivData = fromMaybe M.empty . readish
makePrivDataDir :: IO ()
makePrivDataDir = createDirectoryIfMissing False privDataDir