mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix: ensure empty DEBUG envvar is ignored
Also ensures the envvar is removed if it's empty, and doesn't permeate
an empty DEBUG when executing doom/reload.
Amend: 8c7711920e
Close: #8310
Co-authored-by: AjaiKN <AjaiKN@users.noreply.github.com>
This commit is contained in:
@ -49,9 +49,12 @@
|
||||
|
||||
;; UX: Respect DEBUG envvar as an alternative to --debug-init, and to make
|
||||
;; startup more verbose sooner.
|
||||
(when (getenv-internal "DEBUG")
|
||||
(setq init-file-debug t
|
||||
debug-on-error t))
|
||||
(let ((debug (getenv-internal "DEBUG")))
|
||||
(when (stringp debug)
|
||||
(if (string-empty-p debug)
|
||||
(setenv "DEBUG" nil)
|
||||
(setq init-file-debug t
|
||||
debug-on-error t))))
|
||||
|
||||
(let (;; FIX: Unset `command-line-args' in noninteractive sessions, to
|
||||
;; ensure upstream switches aren't misinterpreted.
|
||||
|
Reference in New Issue
Block a user