diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-12-19 16:42:45 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-12-19 16:42:45 -0400 |
| commit | 35113853cd1118a12debbdac2df85c02076f5a8f (patch) | |
| tree | 810fa01bd47c5f31f6972cd1d1bf7c93b1d61cf7 /src/Propellor/Gpg.hs | |
| parent | 4d12d728dd1ef087af39de142c0c5422495305b9 (diff) | |
| parent | 4e4c7bb914779ded627bc28de116acd8b0867986 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Gpg.hs')
| -rw-r--r-- | src/Propellor/Gpg.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Propellor/Gpg.hs b/src/Propellor/Gpg.hs index 960c70d3..949eb5b5 100644 --- a/src/Propellor/Gpg.hs +++ b/src/Propellor/Gpg.hs @@ -79,12 +79,12 @@ rmKey keyid = exitBool =<< allM (uncurry actionMessage) ] where rmkeyring = boolSystem "gpg" $ - (map Param useKeyringOpts) ++ + (map Param useKeyringOpts) ++ [ Param "--batch" , Param "--yes" , Param "--delete-key", Param keyid ] - + gitconfig = ifM ((==) (keyid++"\n", True) <$> processTranscript "git" ["config", "user.signingkey"] Nothing) ( boolSystem "git" [ Param "config" @@ -92,7 +92,7 @@ rmKey keyid = exitBool =<< allM (uncurry actionMessage) , Param "user.signingkey" ] , return True - ) + ) reencryptPrivData :: IO Bool reencryptPrivData = ifM (doesFileExist privDataFile) @@ -101,7 +101,7 @@ reencryptPrivData = ifM (doesFileExist privDataFile) gitAdd privDataFile , return True ) - + gitAdd :: FilePath -> IO Bool gitAdd f = boolSystem "git" [ Param "add" @@ -125,7 +125,7 @@ gpgSignParams ps = ifM (doesFileExist keyring) -- Automatically sign the commit if there'a a keyring. gitCommit :: Maybe String -> [CommandParam] -> IO Bool gitCommit msg ps = do - let ps' = Param "commit" : ps ++ + let ps' = Param "commit" : ps ++ maybe [] (\m -> [Param "-m", Param m]) msg ps'' <- gpgSignParams ps' if isNothing msg |
