bump: :tools direnv

purcell/envrc@7f36664fc6 -> purcell/envrc@1954e8c0b5

Upstream introduced a new envrc-direnv-executable variable, which we'll
now use.

* modules/tools/direnv/config.el (+direnv--fail-gracefully-a): use new
  envrc-direnv-executable, and abort envrc-global-mode once, at startup,
  rather than every time envrc-mode is activated.

Close: #7046
This commit is contained in:
Henrik Lissner 2023-02-17 12:08:32 -05:00
parent 7a2a5afb97
commit ddb0740f90
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
2 changed files with 4 additions and 6 deletions

View file

@ -1,7 +1,6 @@
;;; tools/direnv/config.el -*- lexical-binding: t; -*-
(use-package! envrc
:when (executable-find "direnv")
:hook (doom-first-file . envrc-global-mode)
:config
(add-to-list 'doom-debug-variables 'envrc-debug)
@ -25,10 +24,9 @@
(defadvice! +direnv--fail-gracefully-a (&rest _)
"Don't try to use direnv if the executable isn't present."
:before-while #'envrc-mode
(or (get 'envrc-mode 'direnv-executable)
(put 'envrc-mode 'direnv-executable (executable-find "direnv" t))
(ignore (doom-log "Couldn't find direnv executable"))))
:before-while #'envrc-global-mode
(or (executable-find envrc-direnv-executable)
(ignore (doom-log "Failed to locate direnv executable; aborting envrc-global-mode"))))
;; Ensure babel's execution environment matches the host buffer's.
(advice-add #'org-babel-execute-src-block :around #'envrc-propagate-environment)

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; tools/direnv/packages.el
(package! envrc :pin "7f36664fc6d97a7ca77c6c3e0c6577b72fa0b70d")
(package! envrc :pin "1954e8c0b5c8440ea9852eeb7c046a677fa544f6")