From cd95ea79d004ca874dcc17dc2334f25efdb1bf9a Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 15 Jun 2026 21:38:00 -0500 Subject: fix(auth-config): guard gpg-connect-agent, require user-constants at runtime - The bare call-process to gpg-connect-agent in :config aborted init with file-missing on a machine without the binary. Guard it with cj/executable-find-or-warn. - user-constants was required only eval-when-compile, but authinfo-file is read at load time, so a standalone .elc load failed. Require it at runtime. --- modules/auth-config.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/auth-config.el b/modules/auth-config.el index 7f729f02a..f18c0c1fd 100644 --- a/modules/auth-config.el +++ b/modules/auth-config.el @@ -33,7 +33,7 @@ ;;; Code: (require 'system-lib) -(eval-when-compile (require 'user-constants)) ;; defines authinfo-file location +(require 'user-constants) ;; defines authinfo-file, read at load time below (defcustom cj/auth-source-debug-enabled nil "Non-nil means enable verbose auth-source debug logging. @@ -83,9 +83,11 @@ much context about sensitive services in the Messages buffer." ;; (setq epa-pinentry-mode 'loopback) ;; emacs request passwords in minibuffer (setq epg-gpg-program "gpg2") ;; force use gpg2 (not gpg v.1) - ;; Update gpg-agent with current DISPLAY environment - ;; This ensures pinentry can open GUI windows when Emacs starts - (call-process "gpg-connect-agent" nil nil nil "updatestartuptty" "/bye")) + ;; Update gpg-agent with the current DISPLAY so pinentry can open GUI windows. + ;; Guarded: on a machine without the binary the bare call-process signalled + ;; file-missing and aborted init. + (when (cj/executable-find-or-warn "gpg-connect-agent" "GPG pinentry GUI updates") + (call-process "gpg-connect-agent" nil nil nil "updatestartuptty" "/bye"))) ;; ---------------------------------- Plstore ---------------------------------- ;; Encrypted storage used by oauth2-auto for Google Calendar tokens. -- cgit v1.2.3