diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-03-07 21:39:29 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-03-07 21:39:55 -0400 |
| commit | 3269dd8ffd621fa977cb108e0e6ad2671a7b6836 (patch) | |
| tree | 70e686ef46056984f27c0eccc9551253f08b3a46 /src/Propellor/PrivData.hs | |
| parent | c98285d957865aadaac3190543be1a1b3ae16476 (diff) | |
| parent | 3137c266b0082cf33d0cf747b2a2ea0929ca2d92 (diff) | |
Merge branch 'master' into wip
Diffstat (limited to 'src/Propellor/PrivData.hs')
| -rw-r--r-- | src/Propellor/PrivData.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Propellor/PrivData.hs b/src/Propellor/PrivData.hs index ac7b00d3..bc09f0c6 100644 --- a/src/Propellor/PrivData.hs +++ b/src/Propellor/PrivData.hs @@ -251,12 +251,13 @@ modifyPrivData' f = do makePrivDataDir m <- decryptPrivData let (m', r) = f m - gpgEncrypt privDataFile (show m') - void $ boolSystem "git" [Param "add", File privDataFile] + privdata <- privDataFile + gpgEncrypt privdata (show m') + void $ boolSystem "git" [Param "add", File privdata] return r decryptPrivData :: IO PrivMap -decryptPrivData = readPrivData <$> gpgDecrypt privDataFile +decryptPrivData = readPrivData <$> (gpgDecrypt =<< privDataFile) readPrivData :: String -> PrivMap readPrivData = fromMaybe M.empty . readish |
