Disable +pass-get-field in noninteractive session

Otherwise you'll get pass pinentry prompts in while byte compiling.
This commit is contained in:
Henrik Lissner 2017-07-28 23:59:27 +02:00
parent 7e4a0dbe95
commit ff9965e039
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -12,11 +12,12 @@
;;;###autoload ;;;###autoload
(defun +pass-get-field (entry fields) (defun +pass-get-field (entry fields)
(if-let (data (if (listp entry) entry (auth-pass-parse-entry entry))) (unless noninteractive
(cl-loop for key in (doom-enlist fields) (if-let (data (if (listp entry) entry (auth-pass-parse-entry entry)))
when (assoc key data) (cl-loop for key in (doom-enlist fields)
return (cdr it)) when (assoc key data)
(error "Couldn't find entry: %s" entry))) return (cdr it))
(error "Couldn't find entry: %s" entry))))
;;;###autoload ;;;###autoload
(defun +pass-get-user (entry) (defun +pass-get-user (entry)