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
(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)