Skip to content

Commit

Permalink
Prevent eshell-path-env getting out-of-sync with $PATH (#55)
Browse files Browse the repository at this point in the history
* Prevent `eshell-path-env` getting out-of-sync with $PATH

* use derived-mode-p to check current major mode
  • Loading branch information
dkellner authored and wbolster committed Oct 16, 2019
1 parent e2e717d commit d9ec9a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion direnv.el
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ When FORCE-SUMMARY is non-nil or when called interactively, show a summary messa
(value (cdr pair)))
(setenv name value)
(when (string-equal name "PATH")
(setq exec-path (append (parse-colon-path value) (list exec-directory))))))))
(setq exec-path (append (parse-colon-path value) (list exec-directory)))
;; Prevent `eshell-path-env` getting out-of-sync with $PATH:
(when (derived-mode-p 'eshell-mode)
(setq eshell-path-env value)))))))

;;;###autoload
(defun direnv-allow ()
Expand Down

0 comments on commit d9ec9a8

Please # to comment.