mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
doom-load-envvars-file: only affect default state
Some plugins (like envrc-mode) make process-environment, exec-path and shell-file-name buffer-local. Running `M-x doom/reload` or `doom-load-envvars-file` should affect their global values, and not their buffer local ones.
This commit is contained in:
@ -113,10 +113,16 @@ unreadable. Returns the names of envvars that were changed."
|
|||||||
env (split-string (buffer-substring (match-beginning 1) (point-max))
|
env (split-string (buffer-substring (match-beginning 1) (point-max))
|
||||||
"\0\n"
|
"\0\n"
|
||||||
'omit-nulls))))))
|
'omit-nulls))))))
|
||||||
(setq process-environment (append (nreverse env) process-environment)
|
(setq-default
|
||||||
exec-path (append (split-string (getenv "PATH") path-separator t)
|
process-environment
|
||||||
(list exec-directory))
|
(append (nreverse env)
|
||||||
shell-file-name (or (getenv "SHELL") shell-file-name))
|
(default-value 'process-environment))
|
||||||
|
exec-path
|
||||||
|
(append (split-string (getenv "PATH") path-separator t)
|
||||||
|
(list exec-directory))
|
||||||
|
shell-file-name
|
||||||
|
(or (getenv "SHELL")
|
||||||
|
(default-value 'shell-file-name)))
|
||||||
env)))
|
env)))
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user