--no-tty
Make sure that the TTY (terminal) is never used for any output. This option is needed in some cases because GnuPG sometimes prints warnings to the TTY even if --batch is used.
so, setting this unconditionally might be harmless, and it might well be the behaviour you describe of it trying to write output that causes a problem.
Actually, looking more carefully at the manpage
--no-tty
sometimes prints warnings to the TTY even if --batch is used.
Make sure that the TTY (terminal) is never used for any output. This option is needed in some cases because GnuPG
so, setting this unconditionally might be harmless, and it might well be the behaviour you describe of it trying to write output that causes a problem.