Index: call-agent.c =================================================================== --- call-agent.c +++ call-agent.c @@ -88,6 +88,11 @@ the access to the agent. */ infostr = force_pipe_server? NULL : getenv ("GPG_AGENT_INFO"); + /* + * Override Environment variable if specified on cmdline + */ + if (opt.gpg_agent_info) + infostr = force_pipe_server? NULL: opt.gpg_agent_info; if (!infostr || !*infostr) { const char *pgmname;