From 511518650f63f920de2d0a198aa9a8649f3d0712 Mon Sep 17 00:00:00 2001 From: Jen-Chieh Date: Mon, 13 Feb 2023 04:50:11 +0800 Subject: [PATCH] fix(_prepare.el): Resolve infinite recursion in exec-path setup --- lisp/_prepare.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/_prepare.el b/lisp/_prepare.el index 8649a43f..0875b768 100644 --- a/lisp/_prepare.el +++ b/lisp/_prepare.el @@ -191,9 +191,10 @@ the `eask-start' execution.") (defun eask--update-exec-path () "Add all bin directory to `exec-path'." - (dolist (filename (directory-files-recursively package-user-dir directory-files-no-dot-files-regexp nil nil t)) - (when (string-suffix-p "bin/" (file-name-directory filename)) - (add-to-list 'exec-path (file-name-directory filename) t))) + (dolist (entry (directory-files package-user-dir t directory-files-no-dot-files-regexp)) + (when-let* ((bin (expand-file-name "bin" entry)) + ((file-directory-p bin))) + (add-to-list 'exec-path bin t))) (delete-dups exec-path)) (defun eask--update-load-path ()