diff --git a/core/autoload/config.el b/core/autoload/config.el index 74fb1deb9a6..db2241e1e00 100644 --- a/core/autoload/config.el +++ b/core/autoload/config.el @@ -80,8 +80,9 @@ Runs `doom-after-reload-hook' afterwards." ;; In case doom/reload is run before incrementally loaded packages are loaded, ;; which could cause odd load order issues. (mapc #'require (cdr doom-incremental-packages)) - (doom--if-compile (format "%S sync -e" doom-bin) - (let ((doom-reloading-p t)) + (doom--if-compile (format "%S sync -E" doom-bin) + (let ((doom-reloading-p t) + doom-env-file) (doom-run-hooks 'doom-before-reload-hook) (doom-initialize 'force) (with-demoted-errors "PRIVATE CONFIG ERROR: %s" diff --git a/core/core.el b/core/core.el index c5d076cfeef..466095cf626 100644 --- a/core/core.el +++ b/core/core.el @@ -646,8 +646,9 @@ to least)." ;; Load shell environment, optionally generated from 'doom env'. No need ;; to do so if we're in terminal Emacs, where Emacs correctly inherits ;; your shell environment. - (if (or (display-graphic-p) - (daemonp)) + (if (and (or (display-graphic-p) + (daemonp)) + doom-env-file) (doom-load-envvars-file doom-env-file 'noerror)) ;; Loads `use-package' and all the helper macros modules (and users) can use