mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Fix auth-source-pass to return nil if no entry found
* lisp/auth-source-pass.el (auth-source-pass-search): If there is no matching entry, auth-source-pass-search should return nil, not (nil). This lets auth-source fall back to other backends in the auth-sources list. * test/lisp/auth-source-pass-tests.el: Add corresponding test. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
b9ac4f815e
commit
527efaf798
2 changed files with 7 additions and 1 deletions
|
|
@ -56,7 +56,8 @@ See `auth-source-search' for details on SPEC."
|
|||
;; Do not build a result, as none will match when HOST is nil
|
||||
nil)
|
||||
(t
|
||||
(list (auth-source-pass--build-result host port user)))))
|
||||
(when-let ((result (auth-source-pass--build-result host port user)))
|
||||
(list result)))))
|
||||
|
||||
(defun auth-source-pass--build-result (host port user)
|
||||
"Build auth-source-pass entry matching HOST, PORT and USER."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue