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 b87e91f984f45615b6459ff3829baa9130b8ef75
parent 3a108277637fad89869d904eea963aeb8f45b20d
Author: Tino Calancha <tino.calancha@gmail.com>
Date:   Thu, 29 Aug 2019 12:54:23 +0200

emacs: Check that auth-source-pass-filename is bound before use it

For auth-source-pass versions < 5.0.0, auth-source-pass-filename
is not defined; thus, we must check that this variable exists before
use it.

* contrib/emacs/password-store.el (password-store-dir): Call
bound-and-true-p on auth-source-pass-filename.

Diffstat:
Mcontrib/emacs/CHANGELOG.md | 4++++
Mcontrib/emacs/password-store.el | 4++--
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/contrib/emacs/CHANGELOG.md b/contrib/emacs/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.1.1 + +* (bugfix) Check that auth-source-pass-filename is bound before use it. + # 2.1.0 * (feature) Support extraction of any secret fields stored in the files. diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el @@ -4,7 +4,7 @@ ;; Author: Svend Sorensen <svend@svends.net> ;; Maintainer: Tino Calancha <tino.calancha@gmail.com> -;; Version: 2.1.0 +;; Version: 2.1.1 ;; URL: https://www.passwordstore.org/ ;; Package-Requires: ((emacs "25") (f "0.11.0") (s "1.9.0") (with-editor "2.5.11") (auth-source-pass "5.0.0")) ;; Keywords: tools pass password password-store @@ -181,7 +181,7 @@ Nil arguments are ignored. Output is discarded." (defun password-store-dir () "Return password store directory." - (or auth-source-pass-filename + (or (bound-and-true-p auth-source-pass-filename) (getenv "PASSWORD_STORE_DIR") "~/.password-store"))