m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/contrib/emacs
diff options
context:
space:
mode:
authorTino Calancha <tino.calancha@gmail.com>2019-08-29 12:54:23 +0200
committerTino Calancha <tino.calancha@gmail.com>2019-08-29 12:54:23 +0200
commitb87e91f984f45615b6459ff3829baa9130b8ef75 (patch)
tree94533aa710cb429c94600ebb3f14b72f75b2fb52 /contrib/emacs
parent3a108277637fad89869d904eea963aeb8f45b20d (diff)
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 (limited to 'contrib/emacs')
-rw-r--r--contrib/emacs/CHANGELOG.md4
-rw-r--r--contrib/emacs/password-store.el4
2 files changed, 6 insertions, 2 deletions
diff --git a/contrib/emacs/CHANGELOG.md b/contrib/emacs/CHANGELOG.md
index d4c865f..1d475c8 100644
--- 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
index 22c5444..44c52b4 100644
--- 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"))