mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(cli): GIT_CONFIG* envvars leaking child processes
When launching Doom via 'doom run', the child process inherits bin/doom's environment. This change restricts this sub-environment to the intended target: straight and its use of git. Fix: #6320
This commit is contained in:
3
bin/doom
3
bin/doom
@ -2,9 +2,6 @@
|
||||
:; set -e # -*- mode: emacs-lisp; lexical-binding: t -*-
|
||||
:; case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;; esac
|
||||
:; $EMACS --version >/dev/null 2>&1 || { >&2 echo "Can't find emacs in your PATH"; exit 1; }
|
||||
:; unset GIT_CONFIG
|
||||
:; export GIT_CONFIG_NOSYSTEM=1
|
||||
:; export GIT_CONFIG_GLOBAL="${DOOMGITCONFIG:-/dev/null}"
|
||||
:; $EMACS --no-site-file --script "$0" -- "$@" || __DOOMCODE=$?
|
||||
:; [ "${__DOOMCODE:-0}" -eq 128 ] && { sh "`$EMACS -Q --batch --eval '(princ temporary-file-directory)'`/doom.sh" "$0" "$@" && true; __DOOMCODE=$?; }
|
||||
:; exit $__DOOMCODE
|
||||
|
Reference in New Issue
Block a user