mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix: envvar file loader processing TZ incorrectly
setenv treats the TZ (and only TZ) envvar especially, so we have to too, since I'm intentionally avoiding iteratively setenv'ing envvars to avoid the unnecessary extra work it does. Fix: #5760
This commit is contained in:
@ -125,15 +125,19 @@ unreadable. Returns the names of envvars that were changed."
|
|||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert-file-contents file)
|
(insert-file-contents file)
|
||||||
(when-let (env (read (current-buffer)))
|
(when-let (env (read (current-buffer)))
|
||||||
(setq-default
|
(let ((tz (getenv-internal "TZ")))
|
||||||
process-environment
|
(setq-default
|
||||||
(append env (default-value 'process-environment))
|
process-environment
|
||||||
exec-path
|
(append env (default-value 'process-environment))
|
||||||
(append (split-string (getenv "PATH") path-separator t)
|
exec-path
|
||||||
(list exec-directory))
|
(append (split-string (getenv "PATH") path-separator t)
|
||||||
shell-file-name
|
(list exec-directory))
|
||||||
(or (getenv "SHELL")
|
shell-file-name
|
||||||
(default-value 'shell-file-name)))
|
(or (getenv "SHELL")
|
||||||
|
(default-value 'shell-file-name)))
|
||||||
|
(when-let (newtz (getenv-internal "TZ"))
|
||||||
|
(unless (equal tz newtz)
|
||||||
|
(set-time-zone-rule newtz))))
|
||||||
env))))
|
env))))
|
||||||
|
|
||||||
(defun doom-run-hook (hook)
|
(defun doom-run-hook (hook)
|
||||||
|
Reference in New Issue
Block a user