mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-05 12:37:33 -05:00
cli/env: fix doom-env-ignored-vars not being ignored
And add HOME to ignored vars.
This commit is contained in:
@ -57,20 +57,20 @@ Why this over exec-path-from-shell?
|
|||||||
;; Helpers
|
;; Helpers
|
||||||
|
|
||||||
(defvar doom-env-ignored-vars
|
(defvar doom-env-ignored-vars
|
||||||
'("^PWD$"
|
'("^DBUS_SESSION_BUS_ADDRESS$"
|
||||||
"^PS1$"
|
|
||||||
"^R?PROMPT$"
|
|
||||||
"^DBUS_SESSION_BUS_ADDRESS$"
|
|
||||||
"^GPG_AGENT_INFO$"
|
"^GPG_AGENT_INFO$"
|
||||||
"^GPG_TTY$"
|
"^GPG_TTY$"
|
||||||
"^TERM$"
|
"^HOME$"
|
||||||
|
"^PS1$"
|
||||||
|
"^PWD$"
|
||||||
|
"^R?PROMPT$"
|
||||||
"^SSH_AGENT_PID$"
|
"^SSH_AGENT_PID$"
|
||||||
"^SSH_AUTH_SOCK$"
|
"^SSH_AUTH_SOCK$"
|
||||||
;; Doom envvars
|
|
||||||
"^INSECURE$"
|
|
||||||
"^DEBUG$"
|
|
||||||
"^YES$"
|
|
||||||
"^TERM$"
|
"^TERM$"
|
||||||
|
;; Doom envvars
|
||||||
|
"^DEBUG$"
|
||||||
|
"^INSECURE$"
|
||||||
|
"^YES$"
|
||||||
"^__")
|
"^__")
|
||||||
"Environment variables to not save in `doom-env-file'.
|
"Environment variables to not save in `doom-env-file'.
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in
|
|||||||
;; user's interactive shell, therefore we just dump
|
;; user's interactive shell, therefore we just dump
|
||||||
;; `process-environment' to a file.
|
;; `process-environment' to a file.
|
||||||
(dolist (env process-environment)
|
(dolist (env process-environment)
|
||||||
(if (cl-find-if (doom-rpartial #'string-match-p env)
|
(if (cl-find-if (doom-rpartial #'string-match-p (car (split-string env "=")))
|
||||||
doom-env-ignored-vars)
|
doom-env-ignored-vars)
|
||||||
(print! (info "Ignoring %s") env)
|
(print! (info "Ignoring %s") env)
|
||||||
(insert env "\n")))
|
(insert env "\n")))
|
||||||
|
Reference in New Issue
Block a user