Improve last change to auth-source-pass

* lisp/auth-source-pass.el (auth-source-pass-search): Remove
redundant expand-file-name.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass--with-store): Bind auth-source-pass-filename to an
existing directory to satisfy the new guard in
auth-source-pass-search (bug#76323).
This commit is contained in:
Basil L. Contovounesios
2026-03-26 15:05:22 +01:00
parent 3c06b7d523
commit b5f6bc0072
2 changed files with 5 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ HOST, USER, PORT, REQUIRE, and MAX."
((null host)
;; Do not build a result, as none will match when HOST is nil
nil)
((not (file-directory-p (expand-file-name auth-source-pass-filename)))
((not (file-directory-p auth-source-pass-filename))
;; Do nothing if the password-store folder doesn't exist.
nil)
(auth-source-pass-extra-query-keywords

View File

@@ -91,7 +91,10 @@ This function is intended to be set to `auth-source-debug'."
((symbol-function 'auth-source-pass-entries) (lambda () (mapcar #'car ,store))))
(let ((auth-source-debug #'auth-source-pass--debug)
(auth-source-pass--debug-log nil)
(auth-source-pass--parse-log nil))
(auth-source-pass--parse-log nil)
;; Any existing directory will do, since we shouldn't do I/O
;; except for the guard in `auth-source-pass-search'.
(auth-source-pass-filename default-directory))
,@body)))
(defun auth-source-pass--explain-match-entry-p (entry hostname &optional user port)