From a6cc66e21e718b26d3dbcb08451877178ac0413b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 1 Apr 2019 13:15:15 -0400 Subject: [PATCH] Refresh exec-path & shell-file-name When loading envvars, since `load-env-vars` only affects the environment and not Emacs' variables. --- core/core.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/core.el b/core/core.el index 1ed09ef2d..8703e0260 100644 --- a/core/core.el +++ b/core/core.el @@ -453,10 +453,14 @@ to least)." (user-error "Your package autoloads are missing! Run `bin/doom refresh' to regenerate them"))) ;; Load shell environment - (when (and (not noninteractive) + (when (and (or (daemonp) (display-graphic-p)) (file-readable-p doom-env-file) (require 'load-env-vars nil t)) - (load-env-vars doom-env-file))) + (load-env-vars doom-env-file) + (setq exec-path (append (split-string (getenv "PATH") ":") + (list exec-directory)) + shell-file-name (or (getenv "SHELL") + shell-file-name)))) (require 'core-lib) (require 'core-modules)