prevent `.zlogin` and `.zprofile` from running more than once (#238388)
Fix #238296pull/212294/merge
parent
5a6c2fa66d
commit
0ac5cce008
|
@ -3,6 +3,12 @@
|
|||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# ---------------------------------------------------------------------------------------------
|
||||
|
||||
# Prevent recursive sourcing
|
||||
if [[ -n "$VSCODE_LOGIN_INITIALIZED" ]]; then
|
||||
return
|
||||
fi
|
||||
export VSCODE_LOGIN_INITIALIZED=1
|
||||
|
||||
ZDOTDIR=$USER_ZDOTDIR
|
||||
if [[ $options[norcs] = off && -o "login" && -f $ZDOTDIR/.zlogin ]]; then
|
||||
. $ZDOTDIR/.zlogin
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# ---------------------------------------------------------------------------------------------
|
||||
|
||||
# Prevent recursive sourcing
|
||||
if [[ -n "$VSCODE_PROFILE_INITIALIZED" ]]; then
|
||||
return
|
||||
fi
|
||||
export VSCODE_PROFILE_INITIALIZED=1
|
||||
|
||||
if [[ $options[norcs] = off && -o "login" ]]; then
|
||||
if [[ -f $USER_ZDOTDIR/.zprofile ]]; then
|
||||
VSCODE_ZDOTDIR=$ZDOTDIR
|
||||
|
|
Loading…
Reference in New Issue