password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

commit 4d1bf39fbd6e08f3df2735b584c9ab5daffece8f
parent 1ba31d7ed03f0cab4f7b9104041eeb15dd1bf013
Author: Svend Sorensen <svend@ciffer.net>
Date:   Mon, 16 Mar 2015 10:50:28 -0700

emacs: Separate stdout and stderr

This fixes a problem where gnupg-agent messages would get mixed with the
password content.

Diffstat:
Mcontrib/emacs/password-store.el | 15++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el @@ -54,11 +54,16 @@ Nil arguments are ignored. Returns the output on success, or outputs error message on failure." (with-temp-buffer - (let ((exit-code - (apply 'call-process - (append - (list password-store-executable nil (current-buffer) nil) - (-reject 'null args))))) + (let* ((tempfile (make-temp-file "")) + (exit-code + (apply 'call-process + (append + (list password-store-executable nil (list t tempfile) nil) + (-reject 'null args))))) + (unless (zerop exit-code) + (erase-buffer) + (insert-file-contents tempfile)) + (delete-file tempfile) (if (zerop exit-code) (s-chomp (buffer-string)) (error (s-chomp (buffer-string)))))))