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:
parent
cd93df6ae8
commit
9dad26961a
1 changed files with 13 additions and 9 deletions
|
@ -125,6 +125,7 @@ unreadable. Returns the names of envvars that were changed."
|
|||
(with-temp-buffer
|
||||
(insert-file-contents file)
|
||||
(when-let (env (read (current-buffer)))
|
||||
(let ((tz (getenv-internal "TZ")))
|
||||
(setq-default
|
||||
process-environment
|
||||
(append env (default-value 'process-environment))
|
||||
|
@ -134,6 +135,9 @@ unreadable. Returns the names of envvars that were changed."
|
|||
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))))
|
||||
|
||||
(defun doom-run-hook (hook)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue