Fix #3425: eagerly resolve path to fd executable

This ensures that the correct binary is found, even if you're remoting
onto a system where `fd` is named `fdfind`.
This commit is contained in:
Henrik Lissner 2020-06-24 19:48:10 -04:00
parent 3cf726c07a
commit d034bc2004
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -154,7 +154,9 @@ And if it's a function, evaluate it."
;; `projectile-globally-ignored-directories' are respected.
(lambda (_)
(concat (format "%s . -0 -H -E .git --color=never --type file --type symlink --follow"
doom-projectile-fd-binary)
(or (cl-find-if (doom-rpartial #'executable-find t)
'("fdfind" "fd"))
"fd"))
(cl-loop for dir in projectile-globally-ignored-directories
concat " -E "
concat (shell-quote-argument dir))