Make gpg-agent config work on both Mac architectures

Homebrew installs to /usr/local on x86 and /opt/homebrew on Apple
Silicon architectures, so this plist now sets PATH to cover both
(MacPGP2 as a bonus) and runs gpg-connect-agent via /usr/bin/env.
This commit is contained in:
cyberbob 2026-02-01 20:09:48 +01:00
parent 9778977fa2
commit 4d15a71e10
No known key found for this signature in database
GPG key ID: 2A8F93E739C401C2

View file

@ -1301,8 +1301,7 @@ Create `$HOME/Library/LaunchAgents/gnupg.gpg-agent.plist` with the following con
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
@ -1311,9 +1310,15 @@ Create `$HOME/Library/LaunchAgents/gnupg.gpg-agent.plist` with the following con
<true/>
<key>KeepAlive</key>
<false/>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/usr/local/MacGPG2/bin:/bin</string>
</dict>
<key>ProgramArguments</key>
<array>
<string>/usr/local/MacGPG2/bin/gpg-connect-agent</string>
<string>/usr/bin/env</string>
<string>gpg-connect-agent</string>
<string>/bye</string>
</array>
</dict>