Skip to content

Commit

Permalink
prevent .zshenv recursion (#165174)
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrogge authored Nov 1, 2022
1 parent 8f06fd3 commit a9a1373
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ if [[ -f $USER_ZDOTDIR/.zshenv ]]; then
VSCODE_ZDOTDIR=$ZDOTDIR
ZDOTDIR=$USER_ZDOTDIR

. $USER_ZDOTDIR/.zshenv
# prevent recursion
if [[ $USER_ZDOTDIR -ne $VSCODE_ZDOTDIR ]]; then
. $USER_ZDOTDIR/.zshenv
fi

USER_ZDOTDIR=$ZDOTDIR
ZDOTDIR=$VSCODE_ZDOTDIR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ __vsc_preexec() {
add-zsh-hook precmd __vsc_precmd
add-zsh-hook preexec __vsc_preexec

if [[ $options[login] = off ]]; then
if [[ $options[login] = off && $USER_ZDOTDIR -ne $VSCODE_ZDOTDIR ]]; then
ZDOTDIR=$USER_ZDOTDIR
fi

0 comments on commit a9a1373

Please sign in to comment.