Pass --use-agent to gpg when in no tty mode. Thanks, Eskild Hustvedt.

This commit is contained in:
Joey Hess 2012-08-17 08:22:11 -07:00
parent 211bcd11bd
commit fe8fee235b
3 changed files with 5 additions and 1 deletions

View file

@ -29,7 +29,7 @@ stdParams params = do
b <- getEnv "GPG_BATCH"
let batch = if isNothing e && isNothing b
then []
else ["--batch", "--no-tty"]
else ["--batch", "--no-tty", "--use-agent"]
return $ batch ++ defaults ++ toCommand params
where
-- be quiet, even about checking the trustdb