diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-01-03 16:57:23 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-01-03 16:57:23 -0400 |
| commit | 6a700a2a1c40332bf4961b5ea4122d4bd2bd7996 (patch) | |
| tree | 8fc25d3120cef650166db4a8ccabd7504f68f290 /src/Propellor/Gpg.hs | |
| parent | 3f5cc046915a9f64c31a6d48aaef5254f5eb7598 (diff) | |
| parent | fc6b042daf2a1714485373cec1c7475855799f71 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Gpg.hs')
| -rw-r--r-- | src/Propellor/Gpg.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Propellor/Gpg.hs b/src/Propellor/Gpg.hs index 4c7ccc9c..d3550e88 100644 --- a/src/Propellor/Gpg.hs +++ b/src/Propellor/Gpg.hs @@ -13,6 +13,7 @@ import Prelude import Propellor.PrivData.Paths import Propellor.Message +import Propellor.Git.Config import Utility.SafeCommand import Utility.Process import Utility.Monad @@ -21,11 +22,15 @@ import Utility.Tmp import Utility.FileSystemEncoding import Utility.Env -getGpgBin :: IO String -getGpgBin = getEnvDefault "GNUPGBIN" "gpg" - type KeyId = String +getGpgBin :: IO String +getGpgBin = do + gitGpgBin <- getGitConfigValue "gpg.program" + case gitGpgBin of + Nothing -> getEnvDefault "GNUPGBIN" "gpg" + Just b -> return b + keyring :: FilePath keyring = privDataDir </> "keyring.gpg" |
