From ff9965e039bad886ec499c134a2145e195798a44 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 28 Jul 2017 23:59:27 +0200 Subject: [PATCH] Disable +pass-get-field in noninteractive session Otherwise you'll get pass pinentry prompts in while byte compiling. --- modules/tools/password-store/autoload.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/tools/password-store/autoload.el b/modules/tools/password-store/autoload.el index 0aa8e8657..9317b2310 100644 --- a/modules/tools/password-store/autoload.el +++ b/modules/tools/password-store/autoload.el @@ -12,11 +12,12 @@ ;;;###autoload (defun +pass-get-field (entry fields) - (if-let (data (if (listp entry) entry (auth-pass-parse-entry entry))) - (cl-loop for key in (doom-enlist fields) - when (assoc key data) - return (cdr it)) - (error "Couldn't find entry: %s" entry))) + (unless noninteractive + (if-let (data (if (listp entry) entry (auth-pass-parse-entry entry))) + (cl-loop for key in (doom-enlist fields) + when (assoc key data) + return (cdr it)) + (error "Couldn't find entry: %s" entry)))) ;;;###autoload (defun +pass-get-user (entry)