-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Description
-
On NixOS, gpg don't export
GPG_AGENT_INFOvariable andS.gpg-agentfile is under/run/user/<uid>/gnupg/S.gpg-agent, not~/.gnupg/. -
grep cannot match correctly.
prezto-repo about gpg init
Because of first point, the second if-condition about grep, cannot match gpg-agent process, but the process exists.
Output echo ${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent: -1 gpg-agent
Output ps -U "$LOGNAME" -o pid,ucomm | grep " gpg-agent : 29385 gpg-agent
One way to solve is to use gpgconf command I think.
By the way, possibly, there are other system having the same problem. I think we can find another way to decide whether gpg-agent is run or not, or try to fix the second grep regex expression to let it fix all system.
Expected behavior
Output: gpg-agent: a gpg-agent is already running - not starting a new one
Actual behavior
No output if it is started.
Steps to Reproduce
NixOS only. Reproduce may be done by installing gpg with nix.
Versions
- Prezto commit:master
- OS information: NixOS 18.09