From 7d0c942587fcc0636e160a813b28efe3fc82f592 Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Fri, 3 May 2024 12:28:33 -0700 Subject: [PATCH] Fix `envrc-global-mode` with absolute direnv path Since e0e84964cf5d1096c95940d983e12cb7772b08fe, `envrc-global-mode` no longer works when `envrc-direnv-executable` is customized. Since it always checks for "direnv", it won't work if direnv is not on the path or if the direnv executable has a different name. --- envrc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envrc.el b/envrc.el index ee01906..f39bf37 100644 --- a/envrc.el +++ b/envrc.el @@ -143,7 +143,7 @@ e.g. (define-key envrc-mode-map (kbd \"C-c e\") \\='envrc-command-map)" ;;;###autoload (define-globalized-minor-mode envrc-global-mode envrc-mode (lambda () (when (and (not (minibufferp)) (not (file-remote-p default-directory)) - (executable-find "direnv")) + (executable-find envrc-direnv-executable)) (envrc-mode 1)))) (defface envrc-mode-line-on-face '((t :inherit success))