factored out some useful error catching methods
This commit is contained in:
parent
a71c03bc51
commit
49d2177d51
15 changed files with 54 additions and 61 deletions
|
@ -173,7 +173,7 @@ gpgParams :: [CommandParam] -> IO [String]
|
|||
gpgParams params = do
|
||||
-- Enable batch mode if GPG_AGENT_INFO is set, to avoid extraneous
|
||||
-- gpg output about password prompts.
|
||||
e <- catch (getEnv "GPG_AGENT_INFO") (const $ return "")
|
||||
e <- catchDefaultIO (getEnv "GPG_AGENT_INFO") ""
|
||||
let batch = if null e then [] else ["--batch"]
|
||||
return $ batch ++ defaults ++ toCommand params
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue